URL Encode / Decode
Percent-encode or decode strings and full URLs.
Last updated August 26, 2026
About this tool
URLs can only safely contain a limited set of ASCII characters, so spaces, symbols, and non-ASCII text (like emoji or accented letters) must be percent-encoded — replaced with a % followed by their hex byte value — before being placed in a query string or path. This tool encodes text to that percent-encoded form, or decodes an already-encoded URL back to readable text.
Common percent-encoded characters
| Character | Encoded |
|---|---|
| space | %20 (or + in query strings) |
| & | %26 |
| # | %23 |
| ? | %3F |
| / | %2F |
| = | %3D |
Code examples
The second line (where shown) is the inverse operation.
| Language | Code |
|---|---|
| JavaScript | encodeURIComponent(str)decodeURIComponent(str) |
| Python | urllib.parse.quote(s)urllib.parse.unquote(s) |
| PHP | rawurlencode($s)rawurldecode($s) |
Frequently asked questions
What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent (used here) escapes every reserved character, making it safe for a single query parameter value. encodeURI leaves characters like / and & untouched since it assumes you're encoding a whole URL, not one component of it.
Why do some encoders use + instead of %20 for spaces?
That's a convention specific to the `application/x-www-form-urlencoded` format used in query strings and form submissions — elsewhere in a URL, spaces are encoded as %20.
I want a readable permalink, not a percent-encoded string. What should I use?
Use the Slug Generator to turn a title into a clean URL slug, then encode any remaining special characters here if needed.