URL Encoder / Decoder

Encode or decode URL strings instantly. Convert special characters to percent-encoding (%20, %26) and decode them back. Free,

FAQ

URL encoding (percent-encoding) converts special characters into a format safe for URLs. Spaces become %20, ampersands become %26, and other non-ASCII characters are converted to their byte representations.

Always encode query parameter values that contain special characters like spaces, &, ?, =, or non-ASCII text. Most frameworks handle this automatically, but manual encoding is useful for debugging.

Characters that are not allowed in URLs include spaces, quotes, angle brackets, non-ASCII characters, and most punctuation. encodeURIComponent encodes all of these. Safe characters that don't need encoding include letters, digits, hyphens, underscores, periods, and tildes.

encodeURI is for encoding full URLs — it preserves characters like : / ? & # that are part of URL structure. encodeURIComponent is for encoding individual query parameter values — it encodes everything except A-Z, a-z, 0-9, -, _, ., !, ~, *, ', (, ). Always use encodeURIComponent for query parameter values.

%20 is the percent-encoded form of a space character. The encoding converts each byte of non-ASCII or reserved characters into a % followed by two hex digits. Other common encodings: %23 for #, %26 for &, %3D for =, %2F for /.

Yes. If you encode an already-encoded string, the % signs get re-encoded (%20 becomes %2520). This can cause 404 errors, broken links, and incorrect parameter parsing. Always decode first if you're unsure whether a string is already encoded.

encodeURIComponent encodes more characters (including /, ?, &) - use it for query parameter values. encodeURI preserves URL structure characters and is better for full URLs.