URL Encode & Decode Online
Percent-encode text so it is safe to use in links and query strings, or decode %20-style text back to normal.
Text Input
Result
What Is URL Encoding?
URL encoding, also called percent-encoding, replaces characters that are not allowed in a web address with a % followed by two hex digits. For example a space becomes %20 and & becomes %26. This keeps links and query strings working, especially when they contain spaces, symbols, other languages or emoji.
How to Encode or Decode a URL
- Paste a URL, a query value or encoded text into the box.
- Click Encode, or Decode to turn %20-style text back to normal.
- Turn on Encode a full URL to keep the parts that give a link its structure.
- Click Copy or Download to save the result.
Features
- Component mode for single values, full URL mode for whole links.
- Decodes + as a space, as in forms and query strings.
- Each line is handled on its own, so you can encode a list at once.
- Runs in your browser. Nothing is uploaded.
Example
Café & Co / 50% off → Caf%C3%A9%20%26%20Co%20%2F%2050%25%20off
The letter é becomes two bytes in UTF-8, so it turns into %C3%A9. The space, &, / and % are encoded too, because they would otherwise break the link or change its meaning.
Encode a Value or a Full URL?
This is the most common mistake. When you encode a single value, like a search term, every special character must be encoded. When you encode a full URL, the characters that give the link its structure, such as :, /, ?, & and =, must stay as they are.
https://example.com/search?q=Caf%C3%A9%20&%20Co
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3DCaf%C3%A9%20%26%20Co
Notice that full URL mode left the & alone, so the server would now read Co as a separate parameter. The right way is to encode each value on its own and then build the URL: ?q=Caf%C3%A9%20%26%20Co.
%20 or +?
Both can mean a space. %20 works everywhere in a URL. The + sign means a space only in query strings and HTML form data. This tool decodes both.
URL Encoding in Code
encodeURIComponent('Café & Co') // for one value
encodeURI('https://example.com/a b') // for a whole URL
new URLSearchParams({ q: 'Café & Co' }).toString() // q=Caf%C3%A9+%26+Cofrom urllib.parse import quote, urlencode
quote("Café & Co", safe="") # one value
urlencode({"q": "Café & Co"}) # q=Caf%C3%A9+%26+CoFrequently Asked Questions
What is URL encoding?
URL encoding (percent-encoding) replaces characters that are not allowed in links, like spaces, &, ? and emoji, with codes such as %20, so the link works everywhere.
When should I encode a full URL?
Use the full URL option to keep characters like : / ? and & that give a link its structure. Leave it off to encode a single value, such as a search query.
Can it decode + as a space?
Yes. When decoding, + signs are treated as spaces, as in form data and query strings.
Is my data uploaded?
No. Everything runs in your browser.