URL Encoder & Decoder
Encode or decode URLs and query strings instantly. Supports percent encoding and Base64 URL encoding.
🔤
URL Encoding
Converts special characters into % followed by two hex digits. Spaces become %20. Required for safe URLs.
🧩
Component Encoding
encodeURIComponent encodes everything except A-Z a-z 0-9 - _ . ! ~ * ( ). Use for query string values.
📦
Base64 URL
Encodes binary data as ASCII text using URL-safe characters. Used in JWTs, API tokens and file sharing.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent encoding) converts characters that are not allowed in URLs into a safe format. For example, spaces become %20, ampersands become %26. This ensures URLs are transmitted correctly across the internet.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL, leaving characters like / : ? & intact. encodeURIComponent encodes everything except alphanumeric characters and - _ . ! ~ * — use it for individual query string parameter values.
When should I use Base64 URL encoding?
Base64 URL encoding is used when you need to transmit binary data as text in a URL-safe format. Common uses include JWT tokens, OAuth state parameters, file attachment IDs, and API authentication tokens.