
URL Encoder / Decoder
Encode text so it's safe to drop into a URL, or decode a percent-encoded string back into readable text. It handles spaces, reserved symbols like & and ?, and full Unicode. Paste your text, choose Encode or Decode, and copy the result — all in your browser.
How to Use
Paste your text or URL into the box. Click Encode to convert special characters into percent-encoded form (for example a space becomes %20), or Decode to turn a percent-encoded string back into plain text. Copy the result with one click. If a string can't be decoded, the tool tells you why.
Why This Tool Is Useful
URLs can only contain a limited set of characters. Anything else — spaces, ampersands, question marks, emoji, non-Latin letters — must be percent-encoded, or the link breaks or gets misread. This tool is essential when you're building query strings, debugging API requests, handling redirect parameters, or reading an encoded URL from a log. It uses the browser's own encodeURIComponent and decodeURIComponent, so the results exactly match what your code will produce.
What Percent-Encoding Does
Percent-encoding replaces an unsafe character with a % followed by its hexadecimal byte value. A space becomes %20, an ampersand becomes %26, and so on. Multi-byte Unicode characters become several percent-encoded bytes. This keeps the URL unambiguous so servers and browsers parse it the same way.
encodeURIComponent vs encodeURI
This tool uses encodeURIComponent, which encodes reserved characters like &, =, ?, and / — the right choice when you're encoding a single value to place inside a query string or path segment. encodeURI (used for a whole URL) deliberately leaves those structural characters alone. If you're encoding one parameter value, component-encoding is what you want.
Common Places You Need It
Percent-encoding shows up constantly in web work:
- Building query strings like ?q=hello%20world.
- Passing a URL as a parameter (for OAuth redirects, for example).
- Sending form data or API request bodies.
- Reading encoded values back out of a log or analytics tool.
- Fixing links that broke because of a space or special character.
Common Characters and Their Encodings
| Character | Encoded as |
|---|---|
| space | %20 |
| " (quote) | %22 |
| # (hash) | %23 |
| % (percent) | %25 |
| & (ampersand) | %26 |
| + (plus) | %2B |
| / (slash) | %2F |
| : (colon) | %3A |
| = (equals) | %3D |
| ? (question mark) | %3F |
| @ (at) | %40 |