URL Encoder & Decoder
Percent-encode text for use in a URL, or decode it back. Runs entirely in your browser — nothing is uploaded.
Escapes / ? & = # too — use for a single parameter value.
About URL Encoder / Decoder
URL Encoder converts text into the percent-encoded form a URL requires, and converts it back again. It offers two modes because the correct answer depends on whether you are encoding a single parameter value or an entire address — a distinction that quietly breaks a great many links.
A URL may only contain a restricted set of characters. Anything else — a space, an ampersand, a question mark, an accented letter, an emoji — has to be written as a percent sign followed by the hexadecimal value of each byte. A space becomes %20, an ampersand becomes %26, and characters outside ASCII expand to several escapes because they are encoded as UTF-8 first.
The subtle part is scope. Encoding a query VALUE must escape the reserved characters /, ?, & and =, because a value containing an ampersand would otherwise look like the start of another parameter and split the query in two. Encoding a WHOLE address must leave those characters alone, or the slashes in the path and the separators in the query get mangled and the address stops resolving. JavaScript exposes this as encodeURIComponent versus encodeURI; picking the wrong one is one of the most common sources of broken links, and this tool makes the choice explicit rather than guessing.
Decoding fails in a characteristic way worth recognising. A stray percent sign that is not followed by two hexadecimal digits is not valid encoding, so the decoder rejects the whole string rather than guessing. That usually means the text was encoded twice, was truncated when copied, or contains a literal percent that should itself have been written as %25.
How to encode and decode a URL
- Choose Encode to convert plain text, or Decode to read an encoded string.
- Pick the scope: Query value for a single parameter, Whole URL for a complete address.
- Paste your text into the box.
- Click the button to convert.
- Copy the result, or press Swap to feed it back and check the round trip.
Tips & common problems
Spaces become %20, not +
The plus sign only means a space inside an HTML form submission (the application/x-www-form-urlencoded format). Everywhere else in a URL a literal plus means a plus, so encoding a space as + can silently change your data.
Never encode a URL twice
Running an already-encoded string through again turns each % into %25, producing things like %2520. If a link contains %25 where you expected a space, double encoding is the cause.
Encode values, not the separators
Build the URL first, then encode each parameter value individually. Encoding the finished string escapes the ? and & that give it structure.
Non-ASCII expands to several escapes
An accented letter or emoji is encoded as UTF-8 bytes, so one character can become three or four escapes. That is correct, not a bug — it is why encoded URLs get long.
Frequently asked questions
What is URL encoding?
It is the mechanism that lets a URL carry characters it could not otherwise contain, by writing each disallowed byte as a percent sign followed by two hexadecimal digits. A space becomes %20.
What is the difference between the two modes?
Query value escapes the reserved characters / ? & = # as well, which is what you want for a single parameter. Whole URL leaves them intact so a complete address keeps its structure.
Why does my decode fail with an error?
The string is not valid percent-encoding — usually a lone % not followed by two hex digits, or a value that was truncated when copied. A literal percent must itself be written as %25.
Should a space be %20 or a plus sign?
%20 in a URL. The plus only means a space in form-encoded request bodies, so using it elsewhere can be misread as a literal plus character.
Does this handle emoji and other languages?
Yes. Text is converted to UTF-8 before encoding, so any character encodes and decodes correctly in both directions.
Is my text sent to a server?
No. Encoding and decoding happen entirely in your browser and nothing is transmitted or stored.