URL Encoder & Decoder
How to Use
📖 Tool Introduction
The URL Encoder and Decoder is a free online percent-encoding helper for developers and content writers who need to handle escape sequences such as %E4%B8%AD%E6%96%87 inside addresses. It ships with the two canonical encoding functions you meet every day: encodeURI keeps the whole address intact by leaving structural symbols like colon, slash, question mark and hash untouched, while encodeURIComponent escapes every special character and is therefore the right choice for a single query value appended after the question mark. A sliding flip switch moves the tool between encoding and decoding, and decoding automatically restores Chinese characters, spaces and punctuation back to their readable form. You can also tick the plus-space option to emulate the application/x-www-form-urlencoded behaviour used by plain HTML forms. Whenever the input contains a broken escape sequence where a percent sign is not followed by two hex digits, the tool raises a clear error instead of silently emitting garbage. All arithmetic runs locally in the browser: it sends no network request and never stores the addresses you paste. The interface presents the two encoding flavours as side-by-side mode cards, pairs them with the top toggle for direction, and stays clean on both desktop and phone, so a typical workflow takes only a few seconds from paste to copied result. Because the tool never phones home, it remains equally useful on restricted networks and offline machines. Front-end engineers wiring up search pages find the distinction between the two functions the most common source of bugs, and being able to compare both outputs side by side removes the guesswork. Marketers and content writers, on the other hand, usually only need to turn an ugly long address pasted from an email back into a readable link, which the decode direction handles in a single click. No account, no plugin, no waiting. If you ever find yourself staring at a string full of percent signs and wondering where the real spaces went, this small utility will clear it up in a heartbeat and leave you with a link you can actually read.
✨ Key Features
- Two flavours: encodeURI preserves structure, encodeURIComponent escapes everything
- Bidirectional: the sliding switch flips between encode and decode
- Plus space: optionally encode spaces as plus signs like HTML forms do
- CJK friendly: percent-encoded Chinese and symbols are restored cleanly
- Error reporting: broken %XX sequences produce a clear message
- Offline: purely local, no network request at all
📝 How to Use
- Click one of the two mode cards to pick whole-URL or component encoding
- Flip the top switch to choose between encoding and decoding
- Tick space-to-plus if you need plain form submission behaviour
- Paste the address, parameter or encoded string into the input area
- Run the conversion and copy the result from the output area
⚠️ Notes
- Pick the right flavour: use encodeURI for a full address, encodeURIComponent for a single value; mixing them breaks URLs
- Decode validation: a percent must be followed by two hex digits or the sequence is rejected
- Plus space: with the option on, spaces become plus signs and are restored on decode
- Not encryption: URL encoding is trivially reversible, never hide secrets with it
- Long text: split very long payloads into chunks to stay responsive