URL Encoder and Decoder
Encode text so it can be used safely inside a web address, or decode percent-encoded text such as %20 and %C3%A9 back into readable characters. Choose whether you are working with a piece of a URL (a query value or path segment) or a whole address, and process a list one line at a time if you need to.
- Free
- No sign-up
- Runs in your browser
- Nothing uploaded
Encode or decode a URL
Handy for a list of values. Otherwise line breaks are encoded as %0A.
How to use it
Choose encode or decode
Encode turns special characters into %-sequences. Decode turns them back.
Say what the input is
“A piece of a URL” converts every special character, which is right for a query value. “A whole URL” leaves the characters that structure an address, such as / ? & = and #, alone.
Set the options
Process each line separately for a list. When decoding, tick “Treat + as a space” for text from HTML forms or query strings.
Copy the result
Copy or download it, or use it as the next input and switch direction to check a round trip.
Example: putting a search phrase in a link
To link to a search for “fish & chips” you cannot write the & directly, because it would start a new parameter. Choose Encode with “A piece of a URL” and the phrase becomes fish%20%26%20chips, which you can place after q= in the address.
Characters that are changed
Letters, digits and - _ . ! ~ * ' ( ) are never changed. Common characters that are, and how they are written:
| Character | Encoded | Notes |
|---|---|---|
| Space | %20 | In form data a space is often written as + instead. |
| & | %26 | Separates query parameters, so encode it inside a value. |
| = | %3D | Separates a name from its value. |
| ? | %3F | Starts the query string. |
| / | %2F | Separates path segments. |
| # | %23 | Starts the fragment. |
| + | %2B | Means a space in form data, so a real plus must be encoded. |
| % | %25 | The escape character itself. |
| é | %C3%A9 | Non-ASCII characters are encoded as their UTF-8 bytes. |
Limits and limitations
- Text is encoded as UTF-8, the standard for web addresses. Percent-encoded text that uses another character set, such as an old Latin-1 form, cannot be decoded as text and is reported as an error.
- Whole-URL mode does not parse or validate the address. It only decides which characters to leave alone.
- The ! ' ( ) and * characters are not encoded because browsers' standard encoder leaves them alone; they are allowed in most places but a few strict systems expect them encoded.
- Decoding treats a + as a space only when you tick the option.
Frequently asked questions
What is the difference between encoding a piece and a whole URL?
Encoding a piece converts everything special, so https://example.com/a?b=c becomes https%3A%2F%2Fexample.com%2Fa%3Fb%3Dc. Encoding a whole URL leaves the structure characters alone and only changes things like spaces and non-English letters, so the address still works.
Why does decoding report an error?
A % must be followed by exactly two hexadecimal digits, and the bytes must form valid UTF-8 text. A stray % (for example in “100%”) or a cut-off sequence causes an error. The message says where the problem is.
Is + a space or a plus?
In the query part of a URL produced by an HTML form, + means a space. Elsewhere it is a plus sign. Tick “Treat + as a space” only when decoding form-style text.
Is my text uploaded?
No. Your text is processed by JavaScript running in your browser and is not sent to a server. The page itself still loads from a web server like any website. This site can load advertising or analytics scripts, but only after you accept them in the cookie notice. They are separate from the tools, which never pass the files or text you work with to them.
More tools
- JSON Formatter & ValidatorValidate JSON with exact error locations, then format, minify or sort it.Developer tools
- Base64 Encoder & DecoderEncode text to Base64 or decode Base64 back to text, including the URL-safe form.Developer tools
- QR Code GeneratorTurn a link or text into a QR code and download it as a PNG or SVG.Developer tools