What is url encoder and decoder?
URLs can contain only a limited set of characters. Spaces, ampersands and non English letters must be encoded when they appear in query strings or paths.
Use encode for values you add to a link, and decode when you want to read a link copied from a browser or log.
How to use the url encoder and decoder
- Choose encode or decode.
- Tick the full URL box if the input is a complete link.
- Press Calculate and copy the result.
How the url encoder and decoder works
Encoding uses the standard percent encoding of UTF 8 bytes. For a full URL, characters that have meaning in a URL such as colon, slash and question mark are kept.
Worked example
Common uses of the url encoder and decoder
- Adding a search phrase or email address to a query string.
- Reading a long tracking link copied from a browser.
- Fixing links that break because of spaces or symbols.
- Building redirect and API request URLs.
- Debugging double encoded values.
Tips and common mistakes
Encode each query value separately, then join them with ampersands.
Double encoding is a common bug. If you see %2520, the text was encoded twice.
Background: what to know before you rely on it
URLs may only contain a small set of letters, digits and symbols. Everything else is replaced by a percent sign followed by the two hex digits of the byte, so a space becomes %20. Non English letters are first turned into UTF 8 bytes and each byte is encoded, which is why a single accented letter can become six characters. Some characters have special meaning, such as question mark, ampersand and equals, so they must be encoded when they are part of a value. A plus sign in a query string often means a space in forms, which is another source of confusion. Always encode values, not the whole URL, unless you know you need to.
Private, free and fast
This tool runs entirely in your browser. What you type or choose is not uploaded to a server and is not saved after you close the page, which keeps it fast and private. It is free to use as often as you like. See more in all developer tools, or browse the full list of tools.
Frequently asked questions
What is %20?
A space.
What is the difference between encodeURI and encodeURIComponent?
The first keeps URL structure characters. The second encodes them too.
Why decode a URL?
To read the original text.
Related tools
JSON Formatter and Validator
Paste your JSON and the tool checks that it is valid, then formats it with indentation or compresses it...
Developer ToolsBase64 Encoder and Decoder
Base64 turns text or bytes into a safe string of letters and numbers. Choose encode or decode, paste...
Developer ToolsHash Generator
A hash is a fixed length fingerprint of your text. Enter text to get its SHA 1, SHA 256, SHA 384 and SHA...
Developer ToolsRegex Tester
Enter a pattern, flags and test text. The tester lists every match with its position and capture groups...
SEO ToolsMeta Tag Generator
Enter your page title, description and URL and the generator writes the HTML meta tags, including Open...
GeneratorsLorem Ipsum Generator
Choose how many paragraphs, sentences or words you need and the generator returns placeholder text you...
Results are for information and education. For legal, financial, medical or security decisions, check with a qualified professional. Do not paste live secrets into any website.