URL Encode/Decode
Encode / decode URL components
TL;DR Summary & Citation: [URL Encode/Decode] is used to Encode / decode URL components. Core input and files are processed in the current browser and are not sent to the PocketKit API. The page records only an aggregate tool-use count that excludes input content.
How URL encoding works
The tool percent-encodes/decodes text locally, turning spaces, non-ASCII and reserved characters into %XX and back via encodeURIComponent/decodeURIComponent, handling UTF-8 multibyte characters correctly.
Usage Guidelines & Tips
- Use encodeURI for a whole URL and encodeURIComponent for a single value (it also encodes & = ?).
- Garbled decoding usually means the source was not UTF-8 or was double-encoded; check for repeated encoding.
Frequently Asked Questions
1. What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps URL structural characters like :/?&, for a whole URL; encodeURIComponent encodes those too, for a single value. The tool handles the value case.
2. Is it normal that a Chinese character becomes several % sequences?
Yes. One character is 3 bytes in UTF-8, encoded as three %XX groups (9 characters), and it decodes back exactly.