About URL Encoder Decoder
Encodes and decodes URLs using JavaScript’s encodeURI or encodeURIComponent functions. Processes input in real time as you type, showing character count, byte size, and encoded length for both input and output. Includes a swap button to reverse encode/decode direction, a special character reference table mapping 20 common characters to their percent-encoded equivalents, and context-appropriate example strings.
- Two encoding methods: encodeURI (preserves URL structure characters like :, /, ?, #) and encodeURIComponent (encodes everything for safe use in query parameters)
- Real-time conversion—output updates on every keystroke with no submit button needed
- Character info panel shows character count, UTF-8 byte size, and percent-encoded length for both input and output
- Swap button reverses input/output and toggles encode/decode mode simultaneously
- Reference table for 20 special characters with their percent-encoded values (%20, %26, %3F, etc.)
Frequently Asked Questions
- When should I use encodeURI vs. encodeURIComponent?
- Use encodeURI for encoding a complete URL where you want to preserve the structure (scheme, slashes, query delimiters). Use encodeURIComponent for encoding a value that will be embedded inside a query parameter or path segment—it encodes characters like = and & that would otherwise be interpreted as URL structure.
- Does it handle Unicode text?
- Yes. Both functions encode Unicode characters as UTF-8 byte sequences represented by percent-encoded triplets. For example, a Chinese character becomes three %XX sequences.