URL Encoder & Decoder
Type in either box to percent-encode text for a URL, or decode %20-style sequences back into readable text.
How to Use
- Type or paste text into the top box and the URL-encoded result appears in the bottom box.
- Paste encoded text such as caf%C3%A9 into the bottom box to decode it in the top box. There's no encode or decode button to pick.
- By default every reserved character, including / ? & =, is encoded, which is what you want for a query value. To encode a whole URL, choose “Keep URL structure” so the result still works as a link.
- When decoding form data, check “Decode + as a space”.
- If something is wrong, the box with the problem shows which character it is, and the other box keeps its last good result. “Select the problem” highlights that part for you.
- “Swap” moves the result into the box you typed in so you can encode or decode again. “Clear” empties both boxes.
URL Encode Examples: Input and Output
Type text into the top box and the URL-encoded result appears in the bottom box. Paste encoded text into the bottom box and the decoded text appears above. Here are four examples with the exact output.
| Input | Setting | Output |
|---|---|---|
café & tea=hot? |
All reserved characters | caf%C3%A9%20%26%20tea%3Dhot%3F |
https://example.com/search?q=café tea |
Keep URL structure | https://example.com/search?q=caf%C3%A9%20tea |
caf%C3%A9%20%26%20tea |
Decoding | café & tea |
a+b%2Bc |
Decoding, with “Decode + as a space” checked | a b+c |
In the first row, the é became %C3%A9 because it takes two bytes in UTF-8, and the space, &, =, and ? were all encoded because that setting encodes every reserved character. In the second row, the https://, the /, and the ? were left alone, so the result still works as a link.
Which Option to Choose
Use “All reserved characters” for a single value, such as the text after q= in a search link. If a value contains & or = and you leave it unencoded, the server reads it as the start of the next parameter.
Use “Keep URL structure” when you have a whole link that contains spaces or non-English text, and you only want it to be safe to paste. It leaves the characters that give a URL its shape, so you should not use it for a single value.
When you decode data from an HTML form, check “Decode + as a space”. In an ordinary URL, a + is a plus sign, so leave the box unchecked.
FAQ
How do I URL encode text online?
Type or paste your text into the top box and the encoded result appears in the bottom box. For a query value, leave the default option, which encodes every reserved character. For a full link, choose “Keep URL structure”. Examples are further down the page.
Is my text uploaded or saved?
No. Encoding and decoding run in your browser and nothing you type is sent to a server. Only your option choices are saved on this device, never the text or the URL.
What is URL encoding and when do I need it?
URLs can only contain a limited set of ASCII characters. Spaces, non-English text, and characters with special meaning in a URL, such as & ? =, must be written as a % followed by two hex digits. That's URL encoding, also called percent-encoding. Non-ASCII characters are first converted to UTF-8 bytes, so é becomes %C3%A9.
Is URL encoding a form of encryption?
No. URL encoding follows a public rule and anyone can decode it without a key. It doesn't hide anything, so never rely on it to protect passwords or personal data.
What's the difference between the two encoding options?
“All reserved characters” encodes / ? # & = and the rest, like JavaScript's encodeURIComponent, and also encodes ! ' ( ) *. Use it for query values. “Keep URL structure” leaves those separators alone, like encodeURI, so a full URL with spaces or Unicode stays clickable.
Why does + sometimes mean a space?
HTML forms submitted as application/x-www-form-urlencoded write spaces as +. Check “Decode + as a space” for that kind of data. In an ordinary URL, + is just a plus sign, so leave it unchecked.
What do the decoding errors mean?
Every % must be followed by two hex digits, so a cut-off or mistyped sequence is reported with its character position. If the bytes aren't valid UTF-8, the text may have been cut in the middle of a character, or it was produced with an older encoding such as Windows-1252. This tool only decodes UTF-8.
Related Tools
Base64 Encoder & Decoder
Type in either box to encode text as Base64 or decode Base64 back into text. UTF-8 safe, with a URL-safe alphabet option.
HTML Entity Encoder & Decoder
Type in either box to turn text into HTML entities, or decode < & 中 and other entities back into text. All named entities supported.
Unicode Escape Encoder & Decoder
Type in either box to turn text into \uXXXX, \u{…}, &#x…;, or U+XXXX, or decode any mix of Unicode escapes back into text.
JSON to YAML Converter
Paste into either box to convert JSON to YAML or YAML back to JSON. Big numbers stay exact, and every lost detail gets its own warning.
JSON to TOML Converter
Paste text or open a file in either box to convert between JSON and TOML (including pyproject.toml and Cargo.toml), with per-path warnings for any lost details.
Base Converter
Type in any field to convert between bases 2, 8, 10, 16, and any base from 2 to 36, with big numbers, negatives, repeating fractions, and two's complement.
Text to Binary & Hex Converter
Type in either box to turn text into the binary, octal, decimal, and hex of each UTF-8 byte, or decode those bytes back into text.
QR Code Generator
Turn a URL, text, Wi-Fi network, phone number, or email into a QR code instantly. Download as PNG or SVG.
Password Generator
Generate strong random passwords in one click. Choose the length and character types, up to 10 at a time.
Word Counter
Paste your text to instantly see the word count, characters, lines, paragraphs, and reading time.