DevToolBoxZA DARMO
Blog

Percent Encoding Tool

Complete percent encoding converter and RFC 3986 reference. View character-by-character breakdown and explore reserved vs unreserved character sets.

Percent encoding (also called URL encoding) is defined by RFC 3986 as the mechanism to encode arbitrary data in a URI. Each byte is represented as a percent sign (%) followed by two hexadecimal digits. This tool shows the percent-encoded form of every character in your input and provides a complete RFC 3986 reference.

RFC 3986 Percent Encoding Reference

RFC 3986 defines which characters are allowed in URIs without encoding. All other characters must be percent-encoded as %XX where XX is the hex value of each byte.

Unreserved Characters (never need encoding)

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~

Reserved Characters (have special meaning in URIs)

CharacterEncoded FormPurpose in URI
:%3AScheme/port separator (http:, :8080)
/%2FPath segment separator (/path/to)
?%3FQuery string start (?key=value)
#%23Fragment identifier (#section)
[%5BIPv6 address bracket
]%5DIPv6 address bracket
@%40User info separator (user@host)
!%21Sub-delimiter
$%24Sub-delimiter
&%26Query parameter separator (&key=value)
'%27Sub-delimiter
(%28Sub-delimiter
)%29Sub-delimiter
*%2ASub-delimiter
+%2BSub-delimiter (also space in forms)
,%2CSub-delimiter
;%3BSub-delimiter (path parameters)
=%3DKey-value separator (key=value)

Must-Encode Characters (common examples)

CharacterEncoded FormPurpose in URI
space%20Not allowed in URIs
"%22Not allowed (delimiter in HTML)
<%3CNot allowed (HTML tag)
>%3ENot allowed (HTML tag)
{%7BNot allowed (URI template)
}%7DNot allowed (URI template)
|%7CNot allowed
\%5CNot allowed (escape char)
^%5ENot allowed
`%60Not allowed
%%25Percent sign itself (to avoid ambiguity)

FAQ

What is percent encoding?
Percent encoding is the standard mechanism for encoding characters in URIs, defined by RFC 3986. Characters that are not allowed in a URI component are represented as %XX, where XX is the hexadecimal value of each byte. For multi-byte UTF-8 characters, each byte is separately percent-encoded (e.g., the Chinese character for "good" becomes %E5%A5%BD).
What is the difference between RFC 3986 and RFC 2396?
RFC 3986 (2005) obsoletes RFC 2396 (1998). The main difference is that RFC 3986 removed the distinction between "mark" and "unreserved" characters, simplified the unreserved set to A-Z a-z 0-9 - _ . ~, and made tilde (~) unreserved instead of reserved. RFC 3986 also updated the definition of reserved characters and clarified when percent-encoding is required.
Why is space encoded as %20 and not +?
In RFC 3986 percent encoding, space is always encoded as %20. The + representation for spaces comes from the application/x-www-form-urlencoded format used in HTML forms, which is a separate encoding standard. While + for space is valid in query strings submitted by HTML forms, %20 is the universal standard that works everywhere in URIs. The encodeURIComponent function uses %20, not +.
𝕏 Twitterin LinkedIn

Oceń to narzędzie

4.0 / 5 · 197 ocen

Bądź na bieżąco

Otrzymuj cotygodniowe porady i nowe narzędzia.

Bez spamu. Zrezygnuj kiedy chcesz.

Enjoy these free tools?

Buy Me a Coffee