URL encoding: why links break and how to fix them
Spaces, ampersands and question marks break URLs. Encoding fixes it, and double-encoding breaks it differently.
URLs can only safely contain a limited set of characters. Anything else, a space, an ampersand, a question mark, a hash, or any non-Latin character, has to be percent-encoded or it changes the meaning of the URL. An unescaped ampersand inside a parameter value silently starts a new parameter, which is why the value arrives truncated.
The trap on the other side is double encoding. If you encode a URL that is already encoded, `%20` becomes `%2520` and the link breaks in a way that is confusing to diagnose because it looks encoded. Decode first, check, then encode once. The tool is in ToolHub.
URL Encoder / Decoder: the facts that matter
| Must be encoded | Spaces, &, ?, #, =, +, and non-Latin characters |
| Space becomes | %20, or + in form-encoded data |
| Double-encoding tell | %2520 appearing where %20 should be |
| Scope | Encode parameter values, not the whole URL |
| Privacy | Runs in the browser |
How to do it, step by step
- 1Open the URL encoder in ToolHub.
- 2If you are debugging an existing URL, decode it first to see what it actually contains.
- 3Encode parameter values individually, not the whole URL. Encoding the whole thing escapes the slashes and colons too.
- 4Watch for `%25` in the output, which signals the input was already encoded.
- 5Test the final URL in a browser before shipping it.
Three things worth knowing
- Encode values, not whole URLs. This single rule prevents most URL bugs.
- `%2520` in a URL always means double encoding. It is a reliable diagnostic.
- Broken URLs and redirect chains are a real SEO cost, not just a bug. CodeAiMan's technical SEO checklist covers what to look for.
Common problems, solved
Where to run it
This tool is part of the ToolHub tool library, a library of over 1,000 browser-based tools covering PDF, image, video, audio, text and developer work. Everything runs in the browser and none of it needs an account.
ToolHub is built by codaiman.com, an AI-first software company in Ahmedabad. Related to this page: Technical SEO checklist 2026 codeaiman technical seo checklist covering crawling, indexing and core web vitals.
URL Encoder / Decoder, in the browser: no install, no sign-up, no upload queue. Part of the ToolHub library from CodeAiMan.
Open ToolHubRelated tools
Base64 Encoder / Decoder
Base64 is encoding, not encryption. Anyone can decode it instantly, which matters more than most people realise.
Read guideJSON Formatter
Four mistakes cause almost every JSON parse error. Trailing commas top the list.
Read guideQR Code Generator
Most unscannable QR codes are either printed too small or encode a URL that is far too long.
Read guide