URL Encoder/Decoder
Encode and decode URLs, URI components, and Base64 strings with real-time conversion
Input Text
Characters: 0
Output Text
Characters: 0
Encoding Types Explained
URL Encoding (encodeURI)
Encodes a complete URL. Preserves special URL characters like ://, ?, &, =. Use this when encoding an entire URL.
Input:
https://example.com/search?q=hello world
Output:
https://example.com/search?q=hello%20world
URI Component Encoding (encodeURIComponent)
Encodes all special characters including URL delimiters. Use this for encoding query parameters or path segments. More aggressive than URL encoding.
Input:
hello world & special=chars
Output:
hello%20world%20%26%20special%3Dchars
Base64 Encoding
Encodes binary data as ASCII text using 64 printable characters. Commonly used for encoding images, files, or data in JSON/XML. Increases size by ~33%.
Input:
Hello, World!
Output:
SGVsbG8sIFdvcmxkIQ==
Common Use Cases:
- • URL Encoding: Encoding complete URLs with spaces and special characters
- • Query Parameters: Use URI Component for individual parameter values
- • API Requests: Encode data before sending in URL parameters
- • Base64: Embedding images in HTML/CSS (data URIs)
- • Base64: Encoding credentials for Basic Authentication headers
- • Base64: Storing binary data in JSON or databases