Developer Tool
URL Encoder & Decoder
Percent-encode text for use in a URL, or decode an encoded URL back into readable text.
Runs in your browser — nothing is uploaded
What this does
URLs can only contain a limited set of characters. Anything else — a space, an ampersand inside a search term, a non-English character — has to be written as a percent sign followed by the byte's hexadecimal value. Getting this wrong is a classic source of broken links and of query parameters that split in the wrong place.
The tool offers the two standard JavaScript behaviours: encoding a single component (such as one query-string value), which escapes characters like & and = that have meaning inside a URL, and encoding a whole URL, which leaves those structural characters alone.
How to use it
- Paste text and choose Component (for one value) or Whole URL.
- Press Encode or Decode.
- Copy the result with the Copy button.
Where it stops being right
- Decoding fails on a malformed percent sequence, such as % followed by characters that are not hexadecimal.
- HTML form submissions traditionally encode a space as +. Standard percent-decoding does not turn + back into a space, so this tool leaves + as it is.
Questions
- When should I encode a component rather than a whole URL?
- Encode a component when you are inserting a value into a URL — a search term, a redirect target, a name. Encoding the whole URL is for text that is already a complete URL with a few unsafe characters in it.
- Why does %20 sometimes appear as + instead?
- HTML forms historically encode spaces as +. Both conventions exist; a server has to know which one it is receiving.
- Is my URL sent anywhere?
- No. The conversion happens in your browser.
More developer tools
- Base64 Encoder & DecoderConvert text to Base64 and back, with correct handling of non-English characters.
- JSON Formatter & ValidatorPretty-print, minify and check JSON, with the position of any syntax error.
- JWT DecoderRead the header and payload of a JSON Web Token, with its dates shown in plain language.
- UUID GeneratorGenerate random version 4 UUIDs, one at a time or in bulk.