URL Encoder/Decoder
Encode and decode URLs, query parameters, and special characters
About URL Encoding
URL encoding converts characters that are not allowed in URLs into a format that can be transmitted over the Internet. It replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits.
Encoding Modes
- Standard (encodeURI): Encodes a complete URL, preserving special characters that have specific meaning in URLs, like :, /, ?, &, =
- Component (encodeURIComponent): Encodes URL components like query parameters, encoding even special URL characters
- Encode All: Encodes every character in the input, useful for maximum compatibility
- Custom: Lets you specify which characters to encode, giving precise control
Common URL Encoded Characters
Space: %20
!: %21
": %22
#: %23
$: %24
%: %25
&: %26
': %27
(: %28
): %29
*: %2A
+: %2B
,: %2C
/: %2F
:: %3A
; %3B
=: %3D
?: %3F
@: %40
[: %5B
]: %5D
When to Use Each Encoding Mode
Standard encoding (encodeURI): Use when you need to encode a complete URL that will be used as-is.
Component encoding (encodeURIComponent): Use for individual components of a URL, like query parameters.
All Characters encoding: Use when maximum encoding is needed, or for specific protocols that require extensive encoding.
Custom Characters encoding: Use when you need precise control over which characters get encoded.