URL encoder & parser. Every link, taken apart.
Nothing leaves your browser, every conversion runs on your device.
Parsed locally with your browser's URL engine. Nothing is requested or uploaded.
Components
Query parameters
No query parameters. Add one to build a query string.
Edit a key or value above and the URL rebuilds automatically, correctly re-encoded.
encodeURIComponent or encodeURI, pick the right one
encodeURIComponent (the default) is for a single value going into a URL slot, a query-parameter value, a path segment, a fragment. It escapes / : ? & = # so a value containing those characters can't break URL parsing. Tick Whole-URL mode to switch to encodeURI, which keeps those structural characters intact, use it on a complete URL that already has correct structure but needs spaces or unicode escaped. Space always encodes as %20 (the RFC 3986 form), never +. Nothing you paste is uploaded; it works offline and is free forever.
How to use the URL Encoder & Parser
This tool does two jobs with links. Encode / Decode converts text to and from percent encoding using your browser's own encodeURIComponent and encodeURI functions. URL Parser splits a link into its parts and lets you edit its query parameters while it rebuilds the link for you. It is for developers, marketers and anyone fixing a broken link, building a tracking URL or reading a long encoded address.
Step by step
-
Pick a mode
Press Encode / Decode to convert text, or URL Parser to take a link apart. Encode / Decode is open when the page loads.
-
Encode or decode text
Choose Encode or Decode, then type or paste into the left box. The result appears on the right as you type. Leave Whole-URL mode off for a single value, such as one query value or path segment, and tick it when you are working on a complete address.
-
Copy or decode again
Press Copy above the result to copy it. Press Use result as input to move the result into the left box, which is how you unwrap a link that was encoded twice: decode, move it across, decode again.
-
Parse a link
In URL Parser, paste a link into the paste a url box, or press Load sample. If you leave out the https:// part, the parser tries again with it added. The Components table lists each part of the link.
-
Edit the query parameters
Under Query parameters each parameter is a row with its key and its decoded value. Change any key or value, press + Add parameter for a new row, or press the cross to remove one. The rebuilt url updates as you type.
-
Copy the new link
Press Copy URL to copy the rebuilt link with every value encoded again. Press Clear to empty the parser and start over.
Reading the result
- With Whole-URL mode off, hello world & friends?a=1 encodes to hello%20world%20%26%20friends%3Fa%3D1, so the & ? and = cannot be mistaken for parts of the address. With it on, those characters stay as they are and only the spaces become %20.
- The Components table shows Protocol, Username, Password, Hostname, Port, Path, Query, Fragment and Origin. A password is shown as dots, an empty part as a dash, and a missing port as 443 (default) or 80 (default).
- For the sample link the parameters are q with the value hero tools, page with 2 and sort with price. Repeated keys appear as separate rows.
- In the rebuilt url, spaces in parameter values are written as +, the form style that servers read as a space, so q=hero%20tools comes back as q=hero+tools. Rows with an empty key are left out.
- A hostname with accented letters is shown in its Punycode form starting with xn--, which is how browsers send it.
Tips and common mistakes
- Use the default mode for anything that goes inside a link, such as a redirect address passed as a parameter. Whole-URL mode would leave its & and ? unencoded and break the outer link.
- Decoding stops with an error message if the text has a stray % that is not followed by two hex digits. Find that % and change it to %25.
- Decode does not turn + into a space. If the text came from a submitted form, replace each + with %20 before decoding.
- Encoding twice is a common bug: %20 turns into %2520. If you see %25 in a link, decode once and check the result.
Privacy and limits
Everything runs in your browser using its built in URL functions. Nothing you paste is requested, sent or saved, so links with tokens or keys in them stay on your device. The parser does not visit the link.
Everything a URL tool should do.
- Percent-encode any string with
encodeURIComponent, safe for query-parameter values and path segments that contain slashes, ampersands or spaces. - Encode a whole URL with the Whole-URL toggle (
encodeURI) to escape spaces and unicode while keeping the URL structure parseable. - Decode percent-encoded text back to plain text in one click, with “Use result as input” to peel off layered, double-encoded URLs pass by pass.
- Break any URL into its parts, protocol, username, password, hostname, port, path, query, fragment and origin, in a clean component table.
- Edit query parameters live as key/value rows: change a value, add a key or remove a row and the rebuilt URL updates instantly.
- Copy the rebuilt URL, correctly re-encoded and ready to paste into code, a doc or a browser address bar. Nothing is uploaded.
Frequently asked questions.
What's the difference between encodeURIComponent and encodeURI?
Why does space sometimes encode as %20 and other times as +?
How does the URL Parser edit query parameters?
Which characters get escaped?
Does it handle internationalized domain names (IDN)?
Is the URL I paste sent anywhere?
Published · Last updated .