URL encoding: decode %20, fix broken query strings, and avoid double-encoding
If a link contains %20, %2F, or %3D, it has been URL-encoded. Decoding it makes the value readable again, which is often the fastest way to debug redirects, tracking links, and API requests.
Start here:
- Open the URL encoder/decoder.
- Paste the encoded value and switch to
Decode from URL. - If you are building tracking links, use the UTM builder to avoid mistakes.
What URL encoding is (in one paragraph)
URLs allow only a limited set of characters in certain places. URL encoding (percent-encoding) replaces special characters with a % followed by two hex digits so they can travel safely through browsers, servers, and analytics tools.
For example, a space becomes %20, and = becomes %3D.
If you want the formal rules, RFC 3986 defines percent-encoding and reserved characters.
The mistake that breaks most links: encoding the wrong piece
You almost never want to encode an entire URL by hand. You usually want to encode only the parts that are values:
- a query parameter value
- a redirect URL that is nested inside another URL
- a piece of JSON you are sending as a parameter
If you encode the whole URL, you will often turn : and / into %3A and %2F, which can make the result harder to reason about.
Common decoding issues (and how to fix them)
| What you see | What it usually means | Fix |
|---|---|---|
% followed by non-hex characters | The string is not valid percent-encoding | Find the bad %.. sequence and fix or remove it |
%25 everywhere | The value is double-encoded (% became %25) | Decode once; if you still see %2F style sequences, decode a second time |
Lots of + where you expected spaces | The string came from form encoding (application/x-www-form-urlencoded) | Replace + with a space, then decode |
| A decoded value contains JSON but looks unreadable | You decoded correctly, but the JSON is minified | Format it with the JSON formatter |
Double-encoding in practice
If you start with:
https%3A%2F%2Fexample.com%2Fpricing%3Fplan%3Dpro%26ref%3Demail
That decodes to:
https://example.com/pricing?plan=pro&ref=email
If instead you see %253A%252F%252F patterns, decode once to get back to %3A%2F%2F, then decode again to get the readable URL.
Examples you will see in real work
Decode a campaign parameter
Encoded value:
black%20friday%202025
Decoded value:
black friday 2025
This is common in utm_campaign, utm_content, and ref parameters.
Decode a nested redirect URL
Login flows often include a redirect parameter:
redirect=https%3A%2F%2Fapp.example.com%2Fbilling%3Ftab%3Dinvoices
Decode the part after redirect= to see the destination clearly.
Decode URL-encoded JSON
Some systems shove JSON into a query param:
%7B%22plan%22%3A%22pro%22%2C%22seatCount%22%3A3%7D
Decoded text:
{"plan":"pro","seatCount":3}
Then format it with the JSON formatter so you can spot missing quotes, commas, or unexpected fields.
Build cleaner links (so you debug less)
- If you need UTM tags, use the UTM builder. It uses
URLSearchParams, which handles encoding for you. - If you need a stable path segment, generate a slug with slugify instead of encoding a full title.
- If a value is already encoded, avoid encoding it again. Double-encoding is how
%2520happens.
How to use Textavia's URL encoder/decoder
- Open the URL encoder/decoder.
- Choose
Decode from URLto make values readable, orEncode for URLbefore you paste values into a query string. - Copy the output.
FAQs
Should I encode spaces as + or %20?
In URLs, %20 is the safe default. + is used by form encoding, and some decoders do not treat it as a space unless you convert it first.
Why does decoding fail on some inputs?
Percent-encoding must be valid. Every % must be followed by two hex digits (0-9, A-F). One broken sequence can make the whole string fail.
Does Textavia send my URLs to a server?
No. URL encoding and decoding runs locally in your browser.
Tips and proven approaches
- Decode one layer at a time. Stop when the output is readable, and the
%..sequences are gone. - If you are debugging a redirect parameter, decode only the parameter value, not the entire URL.
- When you see
%3Dand%26in Base64-looking strings, URL-decode first, then use the Base64 tool.
Related tools
- Build tagged campaign links with the UTM builder.
- Create clean path segments with slugify.
- Format decoded JSON with the JSON formatter.
Privacy and security
URL encoding runs locally in your browser. Your text is not uploaded to a server.
