URL encode / decode
This tool lets you encode text for use in a URL (so-called percent-encoding) and decode it back just as easily. Characters that carry special meaning in an address or are not allowed in one – spaces, accented letters, &, ?, =, / and more – are replaced by the safe %XX notation. Handy for link parameters, API queries and debugging. Everything runs in your browser; the text is never sent anywhere.
How URL encoding works
A URL may only contain a limited set of characters. The letters A–Z and a–z, the digits 0–9 and a few symbols such as - _ . ! ~ * ' ( ) pass through unchanged. Everything else – spaces, accented letters, and the delimiters &, =, ?, #, / – has to be encoded so the browser or server does not mistake your content for a control character of the address.
Encoding works by first converting each such character into one or more bytes in UTF-8, then writing every byte as a percent sign followed by two hexadecimal digits. A space becomes %20, the character & becomes %26, and the letter č (two bytes in UTF-8) becomes %C4%8D. Decoding is exactly the reverse: the %XX sequences are read back into bytes, and the original text is reassembled from them.
This tool uses the browser's standard encodeURIComponent and decodeURIComponent functions. It encodes a URL component – a single value such as one parameter – not a whole address, which is why characters like /, ? and & are encoded too; otherwise they would split the address structure. Note: a space is turned into %20, not +; the + sign is used for spaces only by the older application/x-www-form-urlencoded form format.
How to use URL encode / decode
- Paste the text or value you want to place inside a URL into the top field.
- Click Encode to convert it to percent-encoding, or Decode to turn an encoded string back into readable form.
- The result appears in the bottom field, ready to copy.
A concrete conversion example (encoding):
| Input | Output |
|---|---|
| káva & čaj | k%C3%A1va%20%26%20%C4%8Daj |
| a=1&b=2 | a%3D1%26b%3D2 |
| Praha 1 | Praha%201 |
Decoding runs the other way: from k%C3%A1va%20%26%20%C4%8Daj you get back káva & čaj.
What URL encoding is good for
You will use it most often when building a link with a parameter whose value contains spaces, accents or special characters – typically a search query, a name, an e-mail or a path. Without encoding, the link would "break" at the first & or space. Developers appreciate it when calling APIs, testers when debugging query strings, and anyone who needs to work out what hides behind a long encoded address copied from a browser.
Percent-encoding is not encryption or security – it is merely a reversible transcription that anyone can instantly decode back. It does not hide data, it only carries it safely inside an address. Because the whole conversion runs locally in your browser, you can safely feed even sensitive strings through the tool – the pasted text never leaves your device and is not stored anywhere.
FAQ
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent also encodes address delimiters such as <code>/</code>, <code>?</code>, <code>&</code> and <code>=</code>, so it suits a single value (component) inside a URL. encodeURI leaves those characters alone because it encodes a whole address. This tool uses the component variant.
Why is a space turned into %20 and not +?
Standard percent-encoding encodes a space as <code>%20</code>. The <code>+</code> sign is used for spaces only by the older form-submission format (application/x-www-form-urlencoded) in a query string. If you need <code>+</code>, you have to replace spaces manually.
Does the tool support accented letters and emoji?
Yes. Accented letters and emoji are converted to bytes in UTF-8 and each byte is written as <code>%XX</code>. The letter "č" thus becomes <code>%C4%8D</code>. When decoding, the text is restored exactly to its original form.
Which characters are left unencoded?
The letters <code>A–Z</code> and <code>a–z</code>, the digits <code>0–9</code> and the symbols <code>- _ . ! ~ * ' ( )</code> remain unchanged. All other characters, including spaces and accents, are converted to the <code>%XX</code> notation.
Why does decoding show an error?
Decoding fails when the input contains an invalid sequence – for example a <code>%</code> not followed by two valid hexadecimal digits (such as <code>%ZZ</code> or a lone <code>%</code>). Check that the string is complete and was not corrupted during copying.
Is percent-encoding the same as encryption?
No. It is a public, fully reversible transcription that anyone can instantly reverse. It provides no protection or secrecy – it only lets data travel through an address without damaging its structure.
Does the tool send my text to a server?
No. Both encoding and decoding happen entirely in your browser using built-in JavaScript functions. The pasted text never leaves your device and is not stored anywhere.
Can I encode a whole URL at once?
You can, but the tool encodes the value as a component, so it will also encode <code>:</code>, <code>/</code> and <code>?</code> that form the address structure. That is correct for placing into a parameter; to preserve a whole address's structure, encode only the individual parameter values.
Sources & standards
📅 Last updated: 16 July 2026