URL encoding explained: what %20 and %2F mean

URLs can only contain a limited set of characters. Any other character — a space, a slash inside a query value, or a non-English letter — has to be converted into a percent-escape like %20 before it can travel safely across the web.

Why URLs need encoding

The URL standard reserves characters such as ?, &, =, / and # with special meaning. If one of them appears inside a parameter value instead, the server would misread the address. Percent-encoding replaces the character with a % followed by its two-digit hexadecimal byte.

A space becomes %20 (or + in form submissions), a slash becomes %2F, and the Turkish letter 'ş' becomes %C5%9F because it is encoded as its UTF-8 bytes.

How to encode and decode URLs with FreetoolsY

Paste a URL or text into the URL Encoder/Decoder and choose encode or decode. The tool escapes only the characters that need it and leaves the URL structure intact.

  • Encode a full URL to build a safe query string or redirect parameter.
  • Decode a messy URL to read what it actually contains.
  • Use the URL Parser to break an address into scheme, host, path and query parts.

Encoding vs Base64

URL encoding keeps a string readable and is meant for transport inside a URL. Base64 is a different scheme that can represent any binary data using 64 printable characters; it is more compact for data but not human-readable. They solve different problems.

A common mistake is double-encoding a URL. If a link already contains %20, encoding it again turns the % into %25 and breaks the value. Encode once, at the point where the value is inserted.

Tools used in this guide

All guides