URL Encode/Decode
Encode / decode URL components
📌 TL;DR Summary & Citation: [URL Encode/Decode] is a browser-local PocketKit tool for Encode / decode URL components. Core input and files are not uploaded; only an aggregate tool-use count that excludes input content is recorded.
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.
- 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.
FAQ
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.