Home›Developer Tools› URL encode / decodeBrowser
Percent-encode and decode URLs
Percent-encodes text for use in a URL, or decodes it back. Component scope escapes the separators (/ ? & =) as well, which is what you want for a query-string value; whole-URL scope leaves the structure intact.
Common presets
Each one has its own page explaining where that requirement comes from and what to expect.
How to use it
- 1Pick a direction: encode or decode.
- 2Choose the scope — Component for one value, Whole URL for a complete address.
- 3Paste the text into the input box; the result renders live.
Frequently asked questions
- What is the difference between Component and Whole URL?
- Component escapes the reserved characters too — / ? & = # — which is what a query-string value needs, because those characters would otherwise end the value early. Whole URL leaves the structure alone, so an address stays a working address and only spaces and non-ASCII get escaped.
- Why does a space sometimes become %20 and sometimes +?
- %20 is the URL standard, and it is what this tool produces. The + comes from HTML form submissions, which use a slightly different encoding for the body. Both are decoded correctly here, but %20 is the one that is safe everywhere in a URL.
- Why did my ampersand break the link?
- Because an unescaped & starts the next parameter. A value containing one must be percent-encoded as %26 — use Component scope, which does exactly that.
- Do I need to encode a URL that already has Chinese or accented characters in it?
- Browsers display those unencoded and encode them when they send the request, so for reading and clicking it makes no difference. Anywhere a URL is handled by something other than a browser — an API call, an email, a config file — encode it first.