How to URL Encode and Decode Text
Ever seen a link full of `%20` and `%3F` and wondered what happened to it? That is URL encoding — the way special characters are made safe to travel inside a web address. Encoding turns spaces and symbols into `%` codes; decoding turns them back into readable text. This guide explains why URLs need encoding, what the codes mean, and when you need each direction.
Why URLs need encoding
URLs can only reliably contain a limited set of characters. Spaces, and symbols like `?`, `&`, `#`, `/`, and `=`, have special structural meaning in a URL — they separate the parts. So when those characters need to appear *inside* a value rather than as structure, they must be escaped, or they would break the link or be misread. URL encoding (also called percent-encoding) replaces each unsafe character with a `%` followed by its code.
How to encode or decode with this tool
- Open the URL Encoder/Decoder tool.
- Paste your text or encoded string.
- Choose encode or decode.
- Copy the result.
Everything runs in your browser — nothing is uploaded.
What the codes mean
Each `%` code is the character's byte value in hexadecimal. The common ones you will recognize:
- `%20` — a space.
- `%3F` — a question mark.
- `%26` — an ampersand.
- `%23` — a hash.
- `%2F` — a forward slash.
A search for "cats & dogs" becomes `cats%20%26%20dogs` in the URL, so the `&` is treated as literal text rather than a parameter separator.
When you need each direction
- Encode when you are *building* a URL and putting user input or special characters into it — a search term, a value with spaces or symbols, a redirect target. Skipping this is a classic source of broken links.
- Decode when you are *reading* a URL and want the human-readable version — inspecting a link, debugging a parameter, or extracting a value someone sent you.
A common confusion
URL encoding is not Base64, and not the same as encoding the *whole* URL. You typically encode the *values* inside a query string, not the structural characters that make the URL work — encoding the `?` and `&` that separate parameters would break it. Encode the pieces that go *into* the slots, not the slots themselves.
Related tools
To break a URL into its components first, URL Parser separates protocol, host, path, and query. For encoding binary data rather than URL text, Base64 Encoder/Decoder is the counterpart.
Common uses
- Build a link with special characters or spaces.
- Read an encoded URL you were sent.
- Debug a broken query parameter.
- Escape a search term or redirect value.
Privacy and limits
Encoding and decoding are fully local — no upload, nothing stored, offline once loaded. Open the URL Encoder/Decoder tool to make URLs safe and readable.
Try the tool
Open URL Encoder/Decoder →