How to use the URL Encode / Decode
- 1
Choose Encode or Decode and paste your text, URL or query value into the left pane. The result appears on the right as you type.
- 2
Pick the mode: Component for a single value or path segment, Whole URL to keep slashes, question marks and ampersands, or Form data for application/x-www-form-urlencoded with plus signs for spaces.
- 3
When decoding, leave Decode repeatedly on to strip several layers of double encoding at once; the status line says how many passes were needed.
- 4
If the input is an absolute URL, the breakdown under the panes shows protocol, host, path, fragment and each query parameter decoded.
- 5
Press the swap button to reverse the direction, then Copy or Download the result.
Features
- Percent-encodes with encodeURIComponent, encodeURI or form-data rules
- Decodes repeatedly to remove double and triple encoding, reporting the number of passes
- Pinpoints malformed escapes such as %2G with their offset, underlined in the editor
- Detects percent-escapes that do not form valid UTF-8 and explains the likely cause
- Breaks an absolute URL into protocol, host, port, path, fragment and decoded query parameters
- Handles accents, emoji and every Unicode character correctly as UTF-8
- Recognises pasted encoded text and switches to Decode automatically
- Runs entirely in your browser; nothing is uploaded
What percent-encoding does
URLs can only contain a limited set of characters. Spaces, accents, emoji and characters with special meaning such as &, =, ? and / have to be written as % followed by two hex digits for each byte of their UTF-8 representation. Getting this right by hand is tedious, and getting it wrong produces broken links, 400 errors or query parameters that quietly lose their values.
This encoder follows the same rules as browsers and the JavaScript standard library. Component mode escapes aggressively so a value can be dropped anywhere in a URL. Whole URL mode encodes only what must be encoded so a complete address remains clickable. Form data mode produces what a submitted HTML form produces.
Reading a URL
Paste an absolute URL and the breakdown shows each part decoded: the host and port, the path with its segments readable again, the fragment, and every query parameter as a key and value. It is often the quickest way to see what a long tracking link or an OAuth redirect actually contains.
Related tasks
Encoded tokens inside a URL are often Base64; the Base64 Encoder decodes those. To escape text for an HTML page rather than a URL, use the HTML Entity Encoder.
Frequently asked questions
When should I use encodeURIComponent versus encodeURI?
Why does my space become a plus sign in some tools and %20 in others?
What is double encoding and how do I undo it?
Why does decoding fail with a malformed escape?
Are non-ASCII characters handled correctly?
Is my data uploaded anywhere?
Last updated .