ToolBoxOnline
Developer

URL Encoding: What Those %20 Signs Mean and When to Use Them

Spaces become %20, ampersands become %26, and suddenly your URL works. A practical guide to URL encoding for anyone who's ever copied a link that broke.

url encodingurl encoderpercent encodingencode urldecode url

You copy a link from an email. It has spaces and Chinese characters in it. You paste it into a browser and it's broken — half the characters turned into gibberish. That's because URLs can only contain a limited set of characters. Everything else needs to be encoded.

An online URL encoder does this in one click. Paste your URL, and it converts all the special characters into percent-encoded format that browsers and servers understand.

What gets encoded and why

URLs can only safely contain: letters (A-Z, a-z), numbers (0-9), hyphens, underscores, periods, and tildes. Everything else — spaces, symbols, non-Latin characters — gets converted to a percent sign followed by two hex digits.

Space becomes %20. Ampersand (&) becomes %26. A Chinese character like 中文 becomes %E4%B8%AD%E6%96%87. The browser automatically decodes these back to readable text in the address bar, which is why you see the Chinese characters but the actual URL underneath is encoded.

When you need to manually encode

You'll need to manually encode URLs when building query strings, working with APIs, or creating links that contain user-generated content. If your URL includes a search term, a username, or any text with special characters, encode it first.

The tool also decodes: paste an encoded URL and it shows you the original text. This is handy for reading URLs that got double-encoded or debugging why a link isn't working. Try it at our free URL encoder and decoder.

Tools mentioned in this article