URL Encoding Cheat Sheet

A quick reference for URL percent-encoding codes and character classifications.

Common Encodings

Space%20 (not + in URL paths)
!%21
#%23
$%24
%%25
&%26
+%2B
/%2F
=%3D
?%3F
@%40

Reserved Characters

URL path: @ ! $ & ' ( ) * + , ; =
Query string? & = +
Fragment#
Must be encoded in dataSpaces, Unicode, binary data

JS Functions

encodeURI()Encodes full URI, skips ://?# (use for whole URLs)
encodeURIComponent()Encodes everything including ://?# (use for query params)
decodeURI()Decodes a full URI
decodeURIComponent()Decodes a component