Encode special characters for URLs or decode percent-encoded strings instantly.
Common characters and their percent-encoded equivalents:
| Character | Encoded | Description |
|---|---|---|
space | %20 or + | Space character |
! | %21 | Exclamation mark |
# | %23 | Hash/pound sign |
$ | %24 | Dollar sign |
% | %25 | Percent sign |
& | %26 | Ampersand |
' | %27 | Single quote |
+ | %2B | Plus sign |
/ | %2F | Forward slash |
= | %3D | Equals sign |
? | %3F | Question mark |
@ | %40 | At sign |
URL encoding (also called percent-encoding) converts characters into a format that can be safely transmitted over the internet. URLs can only contain a limited set of characters from the ASCII character set. Characters outside this set, or reserved characters with special meanings in URLs, must be encoded.
?key=value&key2=value2application/x-www-form-urlencodedIn JavaScript:
encodeURIComponent() — Encodes everything except: A-Z a-z 0-9 - _ . ! ~ * ' ( )encodeURI() — Preserves URL structure characters: : / ? # [ ] @ ! $ & ' ( ) * + , ; =This tool uses encodeURIComponent() by default, which is the safest choice for encoding query parameters.