GintiCalcEvery calculation

URLBridge

URL Encoder / Decoder

Percent-encode strings for use in URLs, or decode percent-encoded URLs back into readable text.

Percent-encoding for reserved URL characters

Characters that have a structural meaning in a URL must be escaped as a percent sign followed by their hex byte value when they appear inside a value.

CharacterEncodedWhy it is reserved
space%20Terminates the URL in many parsers
!!Not escaped by encodeURIComponent
"%22Quote, breaks HTML attributes
#%23Starts the fragment
%%25Starts an escape sequence itself
&%26Separates query parameters
+%2BMeans a space in form encoding
,%2CList separator in some APIs
/%2FPath separator
:%3ASeparates scheme and port
;%3BLegacy parameter separator
<%3COpens an HTML tag
=%3DSeparates key and value
>%3ECloses an HTML tag
?%3FStarts the query string
@%40Separates userinfo from host
[%5BIPv6 literal delimiter
]%5DIPv6 literal delimiter
^%5EUnsafe in older specs
`%60Unsafe in older specs
{%7BUnsafe in older specs
|%7CUnsafe in older specs
}%7DUnsafe in older specs

encodeURIComponent leaves ! ' ( ) and * unescaped even though RFC 3986 reserves them, so some APIs need those escaped by hand. Encoding % itself as %25 is what stops double-encoding bugs.

Two flavours

encodeURI keeps URL structure characters like : / ? & untouched; encodeURIComponent encodes everything not in the safe-character set — use this one inside query parameters.

Frequently asked questions

My URL has a space in a query parameter — should I use %20 or +?

%20 is the standard percent-encoding for spaces and works everywhere. The + sign is only valid for spaces inside form data (application/x-www-form-urlencoded). When in doubt, use %20.

Should I encode the entire URL or just the query string values?

Encode only the values inside query parameters, not the full URL. Encoding the full URL would break the protocol, slashes, and domain. Use encodeURIComponent for parameter values, not encodeURI.

Why do special characters break my URLs?

URLs can only contain ASCII letters, digits, and a few safe symbols. Characters like spaces, &, =, and # have special meaning in URL syntax, so they must be percent-encoded to be treated as literal data rather than delimiters.

Related Developer calculators

You might also like

Last updated: September 7, 2026