What is URL encoding (percent-encoding)?
Also known as: percent-encoding, URI encoding.
Last updated: July 2026
- URL encoding (percent-encoding)
- URL encoding, or percent-encoding, replaces characters that aren't allowed in a URL with a percent sign followed by two hexadecimal digits of their byte value. For example a space becomes %20 and an ampersand becomes %26. It lets spaces, symbols and non-ASCII text travel safely inside web addresses and query strings.
Encode text for safe use in URLs or decode percent-encoded URLs back to text. Free, instant, in-browser URL encoder/decoder.
Why it's needed
URLs may only contain a limited set of characters. Reserved characters like ?, &, = and / have special meaning, and spaces aren't allowed at all. Percent-encoding escapes anything unsafe so a value like a name with spaces survives inside a query parameter without breaking the URL.
How it looks
Each unsafe byte becomes %XX. Space is %20, @ is %40, and a comma is %2C. Non-ASCII characters are first encoded as UTF-8 bytes, then each byte is percent-encoded — so an emoji or accented letter becomes several %XX sequences.
FAQ
Why is a space shown as %20 in a URL?
Because spaces aren't valid in URLs, so they're percent-encoded to %20.
Is URL encoding the same as Base64?
No — URL encoding escapes unsafe characters as %XX; Base64 re-encodes data into a 64-character alphabet.