URL Encoder / Decoder

Encode and decode URLs and query parameters with component breakdown.

Encode
Decode
Query String Builder
=
Common Characters Reference
CharEncodedNote
%20 Space
! %21 Exclamation mark
# %23 Hash / fragment
$ %24 Dollar sign
& %26 Ampersand (query sep)
' %27 Single quote
( %28 Open paren
) %29 Close paren
* %2A Asterisk
+ %2B Plus (or space in form)
, %2C Comma
/ %2F Slash (path sep)
: %3A Colon
; %3B Semicolon
= %3D Equals (param sep)
? %3F Question mark
@ %40 At sign
[ %5B Open bracket
] %5D Close bracket

Frequently Asked Questions

What is URL encoding (percent encoding)?

URL encoding converts characters that are reserved or unsafe in URLs into a percent sign followed by two hex digits. Examples: space → %20, & → %26, = → %3D, # → %23, / → %2F. Required for query parameter values, form submissions, and any user-supplied data in URLs.

Which characters are safe in URLs without encoding?

Unreserved characters that never need encoding: A–Z, a–z, 0–9, hyphen (-), underscore (_), period (.), tilde (~). All other characters should be percent-encoded in URL components. Some characters (/ : ? & = #) are safe in specific URL positions but must be encoded when used as data values.

What is the difference between encodeURI and encodeURIComponent?

encodeURI() encodes a full URL and deliberately leaves reserved URL characters intact (: / ? & = # @). encodeURIComponent() encodes a single URL component (like a query param value) and does encode those reserved characters. Use encodeURIComponent for values, encodeURI for complete URLs.

Why do spaces sometimes appear as + instead of %20 in URLs?

+ to represent a space is an older convention from HTML form encoding (application/x-www-form-urlencoded). %20 is the RFC 3986 standard for percent-encoding a space in a URL path or query string. Most servers accept both, but %20 is technically correct for modern URLs while + is form-data convention.