URL encoder / decoder
Percent-encode text so it can go into a URL, or decode an encoded URL back to readable text.
How it works
Characters that are not letters, digits or - _ . ~ are written as % followed by the two hex digits of each of their UTF-8 bytes. “Component” uses encodeURIComponent; “full URL” uses encodeURI, which leaves : / ? # & = alone.
Worked example
- café & bar
- c a f (é → C3 A9) space & space b a r
- caf%C3%A9%20%26%20bar
Frequently asked questions
What is the difference between “component” and “full URL”?
A component (a query value, a path segment) must have every special character encoded, including / ? & = and #. A full URL keeps those characters because they give the URL its structure.
Why is a space sometimes %20 and sometimes +?
In a query string sent by an HTML form, spaces are written as +. Everywhere else they are %20. Tick the option to decode + as a space.
Are non-English letters supported?
Yes. Characters are encoded as their UTF-8 bytes, so “ż” becomes %C5%BC.