How to encode or decode a URL for free
To encode or decode a URL, open the ToolCrix URL Encoder/Decoder, paste your URL or text, choose Encode or Decode, and pick the mode: Full URL (encodeURI) or Component (encodeURIComponent). The result appears instantly. Everything runs in your browser.
Need to encode a URL with special characters — or decode a garbled URL from a log file or email link? This guide explains percent-encoding, the difference between encodeURI and encodeURIComponent, and how to do it free in your browser.
Why URL encoding exists
URLs can only contain a limited set of ASCII characters safely. Spaces, symbols, non-ASCII characters and reserved URL characters (like &, =, #) must be percent-encoded to travel safely. For example, a space becomes %20, and & becomes %26. Without encoding, these characters would break the URL structure.
How to encode or decode a URL (step by step)
- Open the URL Encoder/Decoder.
- Type or paste your URL or text.
- Choose Encode to percent-encode, or Decode to convert percent-encoded text back.
- Pick the mode: Full URL preserves URL structure characters (://, /, ?, &, #); Component encodes everything for safe use as a query parameter value.
- Copy the result.
encodeURI vs encodeURIComponent
This is one of the most common JavaScript mistakes. encodeURI is for complete URLs — it keeps the structural characters intact so the URL still works. encodeURIComponent is for individual parameter values — it encodes EVERY special character including / and & so the value doesn't break the query string. Using the wrong one causes bugs that are hard to spot.
Common percent-encoding examples
- Space →
%20(or+in form data) - & →
%26 - = →
%3D - # →
%23 - / →
%2F - ? →
%3F - @ →
%40
Frequently Asked Questions
When should I use encodeURIComponent?
When building a query string's individual parameter values — e.g., encoding a search term or an email address that goes after the = sign.
What does %20 mean in a URL?
It's the percent-encoding for a space character.
Is my data uploaded?
No, all encoding and decoding happens locally in your browser.
Try it now: open the free URL Encoder/Decoder, or browse more developer guides.