URL Encoder / Decoder
Percent-encode and decode URLs and query values.
Runs in your browser Runs entirely in your browser. Nothing you put in it ever leaves your device.
Pick the one that matches what you are encoding.
A single value — one query parameter or path segment. Escapes &, =, ?, / and # too, so the value cannot break out of its slot.
A whole URL — leaves the characters that give a URL its structure alone, so the slashes and the ? keep working.
Form data — application/x-www-form-urlencoded, where a space is a + rather than %20.
Converts as you type. Nothing is sent anywhere.
Ready. Nothing is sent anywhere.
Was this useful?
About this tool
A URL may only contain a limited set of characters, so everything else is written as %XX. The catch is that there are three different rules depending on whether you are encoding one value, a whole URL, or form data — and using the wrong one is how a query parameter containing an ampersand quietly becomes two parameters. This tool makes you pick, and explains what each choice does.
How to use it
- Choose Encode or Decode.
- Say what you are encoding: a single value, a whole URL, or form data.
- Paste your text — the result updates as you type.
- Copy the result, or press Swap to send it back through the other way and check it round-trips.
Supported input
- A single query parameter or path segment (encodeURIComponent)
- A complete URL (encodeURI)
- application/x-www-form-urlencoded, where a space is a +
- Any Unicode text — UTF-8 is used throughout
Privacy
Runs entirely in your browser. Nothing you put in it ever leaves your device. Everything happens in JavaScript on this page, so the tool keeps working even if you go offline after it has loaded — which is the simplest way to see for yourself that nothing is being sent. Read the full privacy information.
Questions
Which of the three should I pick?
If you are encoding one thing that goes inside a URL — a search term, an ID, a redirect target — pick “A single value”. Pick “A whole URL” only when the text already is a URL and you want to leave its structure intact. Pick “Form data” when you are building a POST body by hand.
Why did my ampersand break the URL?
Because a value containing & was encoded as if it were a whole URL, so the & stayed literal and split the query into two parameters. Encoding that value as “A single value” turns it into %26, which stays part of the value.
Why is a space sometimes %20 and sometimes +?
Both are correct, in different places. %20 is right everywhere in a URL; + means a space only in form-encoded data. A + in a path or a fragment is a literal plus sign, which is why the two modes exist separately here.
It says my input is not valid percent-encoding.
A % must be followed by exactly two hexadecimal digits. A stray % — common in text copied from a spreadsheet or a log line — makes the whole string undecodable, and the error names the sequence that broke it.
Is anything sent to your server?
No. The encoding happens in JavaScript on this page. Disconnect from the network after the page loads and the tool carries on working.
Related tools
-
URL Parser
Break a URL into its parts, and strip the tracking off it.
Stays on your device
-
Base64 Encoder / Decoder
Encode text or files to Base64, and decode it back.
Stays on your device
-
JSON Formatter
Format, validate and inspect JSON.
Stays on your device
-
Hash Generator
SHA-256, SHA-384 and SHA-512 for text or a file.
Stays on your device