URL Encoder & Decoder
Encode special characters for safe use in URLs, or decode percent-encoded strings back to readable text.
About URL Encoding
URL encoding converts characters that are not allowed in URLs into a format that can be transmitted over the internet. Special characters like spaces, ampersands, and question marks are replaced with percent-encoded equivalents (e.g., space → %20, & → %26).
This tool supports both encodeURIComponent (for query parameter values) and encodeURI (for full URLs that preserve the URL structure). Use "Encode Component" for individual values and "Encode Full URL" when you have a complete URL with special characters in the path.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent encoding) replaces unsafe characters in URLs with a % followed by two hex digits. For example, a space becomes %20. This ensures URLs are transmitted correctly across the internet.
When should I URL encode?
Encode when passing special characters in query parameters, form data, or path segments. Characters like &, =, ?, #, and spaces must be encoded to avoid breaking the URL structure.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL but preserves characters like :, /, ?, and #. encodeURIComponent encodes everything including those characters — use it for individual query parameter values.
Is my data sent to a server?
No. All encoding and decoding happens in your browser. Your data never leaves your device.
Related Tools
Base64 Encoder — Encode and decode Base64 strings.
JSON Formatter — Format and validate JSON data.