URL Encoder & Decoder
Percent-encode or decode strings and URLs. Component mode for a single query value, full URI mode that keeps URL-structural characters intact.
About This Tool
Percent-encodes or decodes text using the browser's native encodeURIComponent/decodeURIComponent
and encodeURI/decodeURI. Component mode escapes every reserved character, so it's
for a single query parameter value. Full URI mode leaves URL-structural characters
(: / ? # [ ] @ $ & + , ; =) untouched, so it's for encoding a whole URL without breaking it.
Conversion runs live as you type, and the swap button flips Encode/Decode while carrying the current
output back into the input.
For converting a query string into a JSON object instead of just encoding/decoding text, use Query String to JSON.
Key Features
- Encode / Decode operation select: swap direction instantly, with a dedicated swap button that moves output into input.
- Component mode -
encodeURIComponent/decodeURIComponent, for a single query parameter or path segment. - Full URI mode -
encodeURI/decodeURI, preserves: / ? # [ ] @ $ & + , ; =so a whole URL stays valid. - Malformed input caught: a stray
%or invalid escape sequence returns a clear error instead of throwing. - Live conversion: output updates on every keystroke; no separate submit step required.
- Download output: saves the result as a
.txtfile.
Example
Encoding in component mode:
hello world/foo?bar=1
produces:
hello%20world%2Ffoo%3Fbar%3D1
the same input in full URI mode keeps /, ?, and = intact:
hello%20world/foo?bar=1
FAQ
- What's the difference between Component and Full URI mode?
-
Component mode escapes everything except letters, digits, and
- _ . ! ~ * ' ( ): use it for a single value going into a query string. Full URI mode additionally preserves: / ? # [ ] @ $ & + , ; =, so it's for encoding an entire URL without corrupting its structure. - Why did decoding fail with an error?
- The input contains a malformed percent-encoding sequence, a lone
%not followed by two hex digits, or an invalid escape. Fix the sequence and it will decode. - Does the swap button convert my current output back?
- Yes. The swap button flips between Encode and Decode and moves the current output into the input field so you can immediately reverse the conversion.
- Is any data sent to a server?
- No. Encoding and decoding run entirely in your browser using native JavaScript APIs. Nothing leaves your browser.