You've seen them in browser address bars: %20, %3D, %26. These are percent-encoded characters — URL encoding's way of representing characters that have special meaning in a URL or that aren't allowed in one. Understanding what they mean (and why they exist) saves hours of debugging broken links, misrouted form data, and API errors.

What URL Encoding Is and Why It Exists

URLs can only contain a limited set of characters: letters (A–Z, a–z), digits (0–9), and a few special characters (-, _, ., ~). Everything else must be encoded.

Encoding converts a character to a percent sign followed by two hexadecimal digits representing the character's ASCII value. A space (ASCII 32, hex 20) becomes %20. An equals sign (ASCII 61, hex 3D) becomes %3D. This allows URLs to carry virtually any text — search queries, form data, file paths — without breaking the URL's structure.

The standard is defined in RFC 3986. Any HTTP library, browser, or web server understands percent encoding and handles the conversion automatically in most cases — but you'll encounter raw encoded strings regularly in logs, APIs, and query strings.

Most Common Encoded Characters

These are the percent codes you'll encounter most often:

  • %20 — space (also sometimes encoded as + in form data)
  • %2B — plus sign +
  • %3D — equals sign =
  • %26 — ampersand &
  • %3F — question mark ?
  • %2F — forward slash /
  • %23 — hash / pound sign #
  • %40 — at sign @
  • %25 — percent sign % (the escape for percent itself)
  • %3A — colon :

Characters like &, ?, =, #, and / are called reserved characters because they have specific roles in URL structure. Encoding them lets you include them as literal data rather than structural delimiters.

When URLs Need Encoding

Search queries: When you search for "best text tools" in a browser, the URL becomes ?q=best+text+tools or ?q=best%20text%20tools. The search engine encodes your query before appending it.

Form submissions (GET method): Form fields are appended to the URL as query parameters. Any special character in those fields gets encoded automatically.

API calls: When passing parameters with special characters to an API endpoint, you must encode them — otherwise the server may misparse the URL structure.

File paths in URLs: If a file is named "Q&A Guide.pdf", its URL would be /files/Q%26A%20Guide.pdf.

Browsers handle most of this for you when you click links. You only need to manually encode when building URLs programmatically or debugging broken ones.

URL Encoding vs. HTML Encoding

These are different things and often confused:

  • URL encoding (percent encoding): converts characters for safe use in URLs — %20 for space, %26 for &
  • HTML encoding (HTML entities): converts characters for safe display in HTML — &amp; for &, &lt; for <

The same character needs different encoding in different contexts. An ampersand in a URL parameter becomes %26. The same ampersand in HTML text becomes &amp;. Using the wrong encoding in the wrong context is a common source of broken pages and garbled data.

How to Decode a URL

To read a percent-encoded URL, you can either decode it mentally (look up the hex values) or use a decoder tool. Paste any encoded URL or string and get back the readable version instantly.

For example: https://example.com/search?q=text%20tools%20%26%20converters decodes to https://example.com/search?q=text tools & converters.

Decoding is especially useful when debugging API responses, reading server logs, or analyzing UTM parameters in analytics where encoded campaign names appear as raw encoded strings.

Try the Free Tool

Instantly encode special characters in URLs or decode percent-encoded strings back to readable text.

Encode or Decode a URL →

Frequently Asked Questions

What does %20 mean in a URL?

%20 is the URL-encoded representation of a space character. In ASCII, a space has the decimal value 32, which equals hex 20. URL encoding uses the format %XX where XX is the hexadecimal ASCII value of the character.

Why are URLs encoded with percent signs?

URLs can only safely contain a limited set of ASCII characters. Special characters — spaces, ampersands, equals signs, etc. — are either reserved for URL structure or not allowed at all. Percent encoding converts these characters to a safe format (%XX) that can pass through any HTTP infrastructure without being misinterpreted.

What is the difference between %20 and + in a URL?

Both represent a space, but in different contexts. %20 is the standard percent encoding for space in any URL component. The + sign represents space only in query strings (application/x-www-form-urlencoded format — what HTML forms use). In a URL path, + is treated as a literal plus sign, not a space.

Is URL encoding the same as HTML encoding?

No. URL encoding (percent encoding) makes characters safe for use in URLs — space becomes %20, & becomes %26. HTML encoding makes characters safe for display in HTML — & becomes &amp;, < becomes &lt;. The same character needs different encoding in different contexts.

How do I decode a URL that has %20 and other percent codes?

Paste the encoded URL into a URL decoder tool. It converts all percent codes back to their original characters instantly — no manual lookup required. This is useful for debugging API calls, reading server logs, or making sense of analytics URLs.