You copy a link, paste it into a message, and suddenly it is full of strange codes. A simple space has turned into %20, and an ampersand has become %26. Nothing is broken. This is how web addresses are meant to work, and it is called URL encoding, or percent-encoding.
Why Web Addresses Cannot Contain Everything
A web address may only use a limited set of characters: letters, digits, and a few symbols such as hyphen, underscore, dot and tilde. Some other characters already have a job inside an address. A question mark starts the query, an ampersand separates one value from the next, a hash sign points to a section of the page, and a slash divides the parts of the path.
Spaces, accented letters, emoji and these job-holding symbols cannot simply be dropped into an address as ordinary text. Browsers and servers would not know whether an ampersand belongs to your text or separates two values. So each of these characters is replaced by a percent sign followed by two hexadecimal digits that stand for its byte value.
The Characters You Meet Most Often
- Space becomes %20
- & becomes %26
- # becomes %23
- ? becomes %3F
- = becomes %3D
- / becomes %2F
- % itself becomes %25
Letters outside the basic English alphabet are encoded as the bytes of their UTF-8 form, so one letter can become several codes. The letter é becomes %C3%A9, and the euro sign € becomes %E2%82%AC.
Worked Example: A Search Link
Imagine you want to share a link to a search for the phrase coffee & tea. If you type it as it is, the ampersand ends the search value early, and the page only sees coffee.
Raw text:
- coffee & tea
Encoded text:
- coffee%20%26%20tea
Now the whole phrase travels safely as one value. A link built this way looks like example.com/search?q=coffee%20%26%20tea, and the receiving page decodes it back to the original words.
Here is a second example: the text 100% free. The percent sign must be encoded too, so it becomes 100%25%20free. Forgetting this is a common cause of broken links, because a lone percent sign looks like the start of a code that does not exist.
Two Mistakes to Avoid
Encoding a whole address
Encode only the part that holds your text, such as a search phrase or a file name. If you encode a complete address, even the colon and slashes in https:// become codes, and the link stops working as a link.
Encoding twice
If text that is already encoded is encoded again, the percent sign turns into %25. Then %20 becomes %2520, and the receiving page shows a literal %20 instead of a space. If you see this in a link, decode it once and compare.
A Note About the Plus Sign
In the query part of an address, a plus sign is sometimes used to mean a space, particularly in older web forms. In other parts of an address a plus sign is just a plus sign. When you want to be safe, %20 is the clearer choice for a space. Keep in mind that the QTP tool follows the standard browser rules: it encodes a space as %20, and when decoding it leaves a plus sign as a plus sign.
Encode and Decode in a Few Clicks
You can work these codes out by hand using a table of byte values, but it is slow and easy to get wrong, especially with accented letters. A URL encoder and decoder does the same job instantly. In the free QTP tool, paste your text into the top box and press Encode URL to get the safe version, or paste a messy link and press Decode URL to see what it really says. The result appears in the box below, and Copy Output copies it for you. Everything is calculated in your browser, so your links stay on your device.
One thing to remember: the tool encodes every special character it finds, including the colon and slashes in https://. So paste only the part of the link that holds your text, such as a search phrase, not the complete address.
Quick Summary
- URL encoding replaces unsafe characters with a percent sign and two hexadecimal digits.
- A space becomes %20, an ampersand becomes %26, and a percent sign becomes %25.
- Encode only the text that goes into the link, not the whole address.
- If you see %2520 in a link, the text was probably encoded twice.
Have a link full of codes that you want to read? Paste it into the tool and see what it says.


