← All tools/Utilities/Text/URL Encoder Decoder
URL Encoder Decoder
Percent-encode a URL or text, or decode percent-encoding back to readable text.
Result
How it works
encoding: each unsafe character → % followed by its two hex digits (space → %20) decoding: each %XX sequence → the character it stands for
Worked example: “hello world” encodes to “hello%20world”. A full address, https://whiteui.com/?q=hello world&lang=en, encodes the space as %20 and the & as %26, keeping the query readable to a server.
Frequently asked questions
Why encode a URL at all?
URLs may only contain certain characters. A space, an & or a ? inside a value would otherwise be read as part of the URL’s structure, breaking the link.
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent encodes everything unsafe, including & and =, so it is right for a single value. encodeURI leaves the structure characters alone, so it is right for a whole address.
What does %20 mean?
It is the percent-encoding of a space: % followed by 20, the hexadecimal code for a space character.
Can decoding fail?
Yes, on a lone % or a % not followed by two hex digits. The calculator says so plainly instead of showing a broken result.
More tools
Tell us what you think
Loving this tool, or stuck on something? Tell us — it takes a minute.
We’ll only use your name and email to reply if needed. The tool and page are filled in for you.