Developer Tools
URL Encoder and Decoder
Encode URI components or complete URIs, decode UTF-8 percent escapes, and copy or download results in your browser. Includes encodeURIComponent and encodeURI outputs.
Developer Tools
Encode URI components or complete URIs, decode UTF-8 percent escapes, and copy or download results in your browser. Includes encodeURIComponent and encodeURI outputs.
Percent encoding represents selected UTF-8 bytes as a percent sign followed by two hexadecimal digits. For example, component encoding turns coffee & tea into coffee%20%26%20tea. A space becomes %20, and café becomes caf%C3%A9. Decoding restores the text in one pass.
Input and output lengths are counted in UTF-16 code units. These are not necessarily the same as visible characters: an emoji may use two or more code units.
Use encodeURIComponent for an individual query value or URI component. It leaves ASCII letters, digits and - _ . ! ~ * ' ( ) unchanged. Use encodeURI when URI separators should stay in place: it also preserves ; / ? : @ & = + $ , #. Both options encode square brackets.
For example, URI encoding changes https://example.com/search?q=iced tea&size=large to https://example.com/search?q=iced%20tea&size=large. If your query value contains an ampersand, encode that value separately with component encoding before adding it to the URL.
Neither option validates URLs, checks link safety or converts internationalized hostnames to Punycode. An existing percent sign becomes %25; do not blindly encode a URL that has already been encoded.
This tool applies decodeURIComponent once. It preserves leading and trailing whitespace and literal plus signs. It does not parse application/x-www-form-urlencoded data or turn a plus sign into a space. It does not detect legacy character encodings. Malformed percent escapes, invalid UTF-8 byte sequences and unpaired surrogates produce an error without a partial result.
For example, coffee+tea%2Bmilk becomes coffee+tea+milk, while %2520 becomes %20. Only repeat decoding if the source format requires it. Decoding reserved characters can change how a URL is interpreted. Percent encoding is neither encryption nor HTML escaping.
Encoding accepts up to 100,000 UTF-16 code units. Decoding accepts up to 900,000, and each result is limited to 900,000. Over-limit input produces no result; reducing the input restores conversion. The largest encoding result can be moved to Decode mode. A decoded result longer than 100,000 code units cannot be moved to Encode mode; copy and split it into smaller parts.
Switching modes keeps your input. Use result and switch mode moves the component result when encoding, or the decoded result when decoding. Clear removes the input and results.
Copy or select a result to use it elsewhere. Line endings may change in the display or when pasted. Save UTF-8 starts a text-file download that preserves the result's line-ending bytes. It adds no byte order mark (BOM), but retains a BOM already present in the text. Starting a download does not confirm that your device saved the file.
If a clipboard operation is still pending, wait before copying anything else: the earlier operation could finish late and overwrite the clipboard. After about five seconds without confirmation, the tool shows an unconfirmed message. Background tabs or a sleeping device can delay that notice. The native write itself cannot be canceled.
The conversion tool does not send your input text to a server. The page still makes network requests for services such as advertising and usage measurement.
Questions or feedback? Contact NanToo