URL Encoder / Decoder
Encode or decode URLs and query strings safely, entirely in your browser.
About the URL Encoder / Decoder
The URL Encoder / Decoder converts text to and from percent-encoding, the format that lets URLs carry spaces, punctuation, and non-ASCII characters safely. When you type a query string or paste an already-encoded link, the tool transforms it live in your browser — nothing is uploaded, stored, or logged. Switch between Encode and Decode with a single toggle, and use the built-in Swap button to round-trip a value without retyping it.
URLs are only allowed to contain a limited set of characters. Anything outside that set — spaces, ampersands, question marks, accented letters, emoji — has to be "percent-encoded" into sequences like %20 (a space) or %26 (an ampersand). Encoding is essential whenever you build a link by hand, pass user input into a query parameter, construct an API request, or debug a redirect that mangles special characters. Decoding does the reverse, turning a wall of %-escapes back into readable text so you can see exactly what a link is actually carrying.
How to use
- Choose a mode. Click Encode to turn plain text into a URL-safe string, or Decode to turn percent-encoded text back into readable characters.
- Type or paste your text into the input box. The result updates instantly in the read-only box below on every keystroke.
- Pick an encoding scope (encode mode). By default the tool uses
encodeURIComponent, which escapes reserved characters like:,/,?,&, and=— ideal for a single query-string value. Tick "Encode entire URI (keep :/?&=)" to useencodeURIinstead, which leaves those structural characters intact so a whole address stays a working URL. - Copy the result with the Copy result button, or press Swap to move the output into the input and flip the mode — perfect for verifying that a value encodes and decodes back to exactly what you started with.
- Clear empties both boxes so you can start over.
If you paste malformed encoded text while decoding — for example a lone % or a truncated escape like %E0 — the tool shows a friendly inline message instead of crashing, so you can fix the input and try again.
Frequently asked questions
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes almost every reserved character, including :, /, ?, #, &, and =. Use it for a single piece of data you are dropping into a URL, such as one query-string value. encodeURI assumes you are handing it a complete URL and deliberately leaves those structural characters unescaped so the address still works. The checkbox in encode mode lets you pick whichever you need.
When should I URL-encode something?
Encode any text before you place it into a URL where it could contain spaces or reserved characters — search terms, form values, filenames, tokens, or non-English text. Encoding a full, already-valid URL is rarely needed; encoding individual values inside it is what prevents broken links and misread parameters.
Why did decoding show an error?
Decoding fails when the input is not valid percent-encoding. Common causes are a stray % that is not followed by two hex digits, or an incomplete multi-byte escape such as %E0 without its continuation bytes. The tool catches the error, keeps running, and tells you what to check instead of breaking. Fix or remove the offending % sequence and the result will update.
Does a space become %20 or a plus sign?
This tool uses standard percent-encoding, so a space becomes %20. The + shorthand for a space is a convention specific to application/x-www-form-urlencoded form submissions, not general URL encoding. If you need + for a form body, replace %20 with + after encoding.
Is my data sent to a server?
No. All encoding and decoding runs entirely in JavaScript on your own device using the browser's built-in functions. Your text never leaves the page — there is no upload, no request, and no logging. Close the tab and everything is gone.
Can I decode a URL that was encoded multiple times?
Yes, but you may need to decode more than once. Each pass with the Decode mode removes one layer of encoding. If the result still contains % sequences, run it through again — the Swap button makes repeated passes quick by feeding the output straight back in.