URL Encoder / Decoder
Percent-encode and decode URLs and query strings in component, URI or form mode, with UTF-8, UTF-16 or Latin-1 charsets. Runs locally in your browser.
Your inputs and files stay in your browser
Paste a URL, query string or plain text to percent-encode or decode it.
The encoded or decoded result appears here.
On this page
Percent-encode text for URLs and decode %XX sequences back into readable text. Three modes match JavaScript's encodeURIComponent, encodeURI and HTML form encoding, and the work is done in your browser by a WebAssembly module compiled from Rust.
Detailed Functionality
Component mode escapes everything except letters, digits and - _ . ! ~ * ' ( ), so /, ?, & and = are encoded too: use it for one query parameter value or one path segment. URI mode keeps the structure of a full address (: / ? # & = + $ , ; @) and escapes only spaces and characters that are never valid in a URL. Form mode follows application/x-www-form-urlencoded: spaces become + and everything except letters, digits and - _ . * is escaped; on decode it also turns + back into a space.
Before encoding, text is converted to bytes in the chosen charset. UTF-8 is the web standard; ISO-8859-1 (Latin-1), UTF-16LE and UTF-16BE are there for legacy systems, and a character the charset cannot represent is reported with its position. Decoding is strict: every % must be followed by two hex digits, so a stray 100% is reported instead of being passed through silently. The status line shows the output length in characters and bytes.
Practical Examples
Query parameter value: a b&c=d/e? in Component mode becomes a%20b%26c%3Dd%2Fe%3F.
Whole URL: https://example.com/my path?q=a b&x=1 in URI mode becomes https://example.com/my%20path?q=a%20b&x=1, while Component mode turns it into https%3A%2F%2Fexample.com%2Fmy%20path%3Fq%3Da%20b%26x%3D1.
Form data: John Doe & Co. in Form mode becomes John+Doe+%26+Co.; decoding a+b%20c gives a b c in Form mode but a+b c in Component mode.
Charset: café is caf%C3%A9 in UTF-8 and caf%E9 in ISO-8859-1.
How to Use This Tool
Paste text or an encoded string
Enter plain text to encode, or a percent-encoded string to decode, in the Input field.
Choose the mode and charset
In Mode, pick Component (encodeURIComponent-like) for a single value, URI (encodeURI-like) for a whole address or Form (application/x-www-form-urlencoded) for form bodies. Keep Text charset on UTF-8 unless the server expects another encoding.
Encode or decode
Click Encode to percent-encode the input or Decode to restore the text. Invalid
%sequences and characters outside the charset are reported as errors.Copy the result
Click Copy to take the output to the clipboard. Swap moves it back into the input, for example to decode another layer.
Tips and Best Practices
- Encode each query value separately in Component mode, then join them with
&and=. Encoding a whole URL in Component mode also escapes://and breaks the link. - URI mode does not escape
&,=or#: if a parameter value contains them, encode that value in Component mode. +means a space only in form data; outside Form mode it is decoded as a literal plus sign.- Double-encoded text such as
%2520decodes to%20first: click Swap and Decode again to unwrap the next layer. - Use the charset the server expects:
%E9decodes toéwith ISO-8859-1, while in UTF-8 a lone%E9is reported as invalid text.