URL Encode / Decode
Encode or decode URL components. Supports both encodeURIComponent (for query params) and encodeURI (for full URLs).
Output will appear here…Component encodes all special characters including /, ?, &. Use for query parameter values. Full URI preserves URL structure characters. Use for full URLs.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent encoding) replaces unsafe ASCII characters with a '%' followed by their hex value. For example, spaces become %20. It ensures URLs are transmitted correctly over the internet.
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves URL structure characters like /, ?, &, and = — use it for encoding full URLs. encodeURIComponent encodes everything including those characters — use it for encoding individual query parameter values.
Does this handle Unicode characters?
Yes. Both encoding modes properly handle Unicode characters including emojis, accented characters, and CJK scripts by first encoding them as UTF-8 bytes.
Is my data safe?
Yes. All encoding and decoding happens entirely in your browser using JavaScript's built-in functions. No data is sent to any server.