How to use the URL Encoder / Decoder
- Choose a direction. Pick Decode to read a URL full of %XX codes, or Encode to make text safe to put in a URL.
- Paste a URL or some text into the input box. The result appears right away.
- When encoding, choose "A single value" for one search term or parameter value, or "A full URL" for a complete address.
- Paste a URL into the URL Breakdown section below to see its domain, path and parameters laid out in a table.
What is URL encoding (percent-encoding)?
A URL can only contain English letters, digits and a small set of symbols. Anything else, such as spaces, accented letters, emoji or reserved symbols like &, is first converted to UTF-8 bytes. Each byte is then written as % followed by two hexadecimal digits. This is URL encoding, also called percent-encoding.
| Original character | Encoded form |
|---|---|
| Space | %20 (+ is also used in query strings) |
| & | %26 |
| é | %C3%A9 (2 UTF-8 bytes) |
| € | %E2%82%AC (3 UTF-8 bytes) |
| 😀 | %F0%9F%98%80 (4 UTF-8 bytes) |
One accented letter or emoji can turn into two to four %XX groups (6 to 12 characters). That's why links with non-English words, foreign place names or emoji become long and hard to read when you copy and paste them.
encodeURIComponent vs. encodeURI
encodeURIComponent encodes everything, including URL structure characters such as / ? & = #. Use it for a single parameter value, like a search term. That way an & inside the value won't be read as the start of the next parameter.
encodeURI leaves URL structure characters alone and only encodes spaces, non-ASCII characters and a few other unsafe characters. Use it to make a complete URL safe.
- Single value:
salt&pepper→salt%26pepper - Full URL:
https://a.com/?q=café→https://a.com/?q=caf%C3%A9
How to fix URLs that look garbled
A link that looks clean in your browser's address bar often turns into a string full of % signs when you paste it into an email, chat app or document. The link isn't broken, and clicking it still works. You only need to decode it with this tool if you want to read what it says.
If the decoded result shows broken characters like �, the URL may come from an older site that used a legacy encoding such as Windows-1252 or ISO-8859-1 instead of UTF-8. If some % sequences were cut off or invalid, the tool decodes what it can, leaves the rest as is, and tells you how many it skipped.
Reading a URL's structure
The URL Breakdown section splits an address into its parts so you can check them one at a time:
- Protocol: usually
https: - Host (domain): the site's address, such as
tooljip.com - Port: shown only if the URL sets one; otherwise the default is used
- Path: the page location after the domain
- Hash (#): the fragment that points to a spot on the page
Each query parameter after the ? is listed with its decoded value. This makes it easy to spot tracking tags like utm_source or check what a search link actually contains.