URL encoder and decoder
Encoded
3 of 3 lines encoded.
leaking%20tap%20repair%20%26%20parts https%3A%2F%2Fwww.example.com%2Fsearch%3Fq%3Dboiler%20service%20%C2%A379 caf%C3%A9%2Fmenu%3Fday%3Dtoday
- Note: A line starting with http:// was encoded as a single value, slashes and all. That is right when the whole URL is a parameter of another URL; for a link to use as it is, choose “Encode a whole URL”.
How to use it · free, no signup
How to use the URL Encoder and Decoder
Paste text or addresses, one per line, to percent-encode them as a value or a whole URL, or decode them back to plain text. Runs in your browser.
01
Paste the text
One value or URL per line; each line is handled on its own.
02
Choose the mode
Encode a value, encode a whole URL, or decode.
03
Copy the result
Lines that could not be decoded are left as they were and listed.
Why URLs need encoding
A URL may only contain a limited set of characters, and some of those have jobs: / separates the path, ? starts the query, & separates parameters. Anything else, including spaces, accented letters and currency signs, is written as % and two hexadecimal digits for each byte. The starting example encodes three lines as single values:
| Text | Encoded as a value |
|---|---|
| leaking tap repair & parts | leaking%20tap%20repair%20%26%20parts |
| café/menu?day=today | caf%C3%A9%2Fmenu%3Fday%3Dtoday |
| £79 | %C2%A379 |
A value or a whole address
The two encode modes do different jobs. Encoding a value, with encodeURIComponent, turns every character with a meaning in a URL into a %-code, so the value can be placed inside a URL without changing its structure; this is what a search term or a redirect address in a query string needs. Encoding a whole address, with encodeURI, leaves the structural characters alone and only fixes what cannot appear at all, such as spaces and accented letters.
Decoding, and what goes wrong
- A lone percent sign. 100% does not decode, because % must be followed by two hexadecimal digits; a literal % is written %25.
- Plus signs. In form data, + means a space. Turn on the option when decoding query strings from forms.
- Double encoding. %2520 is a space encoded twice. Decode until the text stops changing.
- Broken characters. A multi-byte character cut in half cannot be decoded, and the line is left as it was.
Encoding in campaign links
Campaign tags are the most common place encoding goes wrong: a campaign name with a space or an ampersand can break a link or split one tag into two. The UTM builder encodes each value for you, and the URL slug generator turns titles into addresses that need no encoding at all.
Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.
Questions
What people ask about the URL Encoder and Decoder
What is URL encoding?
What is the difference between encodeURI and encodeURIComponent?
Should a space be %20 or +?
Why does my decoded text show an error?
Why did encoding turn % into %25?
Related tools
URL Slug Generator
Clean URL slugs from page titles
Open itUTM Builder
Tagged campaign links for Google Analytics
Open itSERP Preview Tool
See where a title and description will be cut
Open itMeta Tag Generator
Title, description, canonical and sharing tags in one block
Open itRobots.txt Generator
A clean robots.txt from the paths you want blocked
Open itRobots.txt Tester
Which rule allows or blocks a URL, and why
Open it