About this url encoder & decoder
How to use it
- Choose Encode or Decode, and for encoding pick encodeURIComponent (query values) or encodeURI (whole URLs) — the hint under the toggle explains which to use.
- Type or paste your text. The output updates live as you type, with character counts and the number of encoded sequences.
- Turn on Bulk mode to process a list of URLs, one per line, with per-line results in a table.
- Paste a full URL into the analyzer to split it into protocol, host, port, path, decoded query parameters, and fragment.
- Copy the output. Malformed %-sequences are flagged and left exactly as typed — nothing is ever dropped.
The method behind it
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent escapes everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ) — use it for a single query value or API parameter, where characters like ? & = must not be mistaken for URL structure. encodeURI is gentler: it leaves reserved structure characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) alone and encodes only truly illegal characters like spaces — use it for whole URLs you want to keep clickable. Rule of thumb: encoding one value → encodeURIComponent; encoding a full address → encodeURI.
What does %20 mean in a URL?
It is a space. Percent-encoding represents unsafe bytes as % plus two hexadecimal digits, and 20 is the hex code for the space character (byte 0x20). You will also meet %2F (/), %3F (?), %3D (=), and %26 (&) — reserved characters, escaped when they appear inside a value instead of acting as URL structure.
How do I encode or decode many URLs at once?
Turn on Bulk mode and paste one URL per line — each line is processed independently and the results appear in a per-line table. Lines containing malformed sequences are highlighted so you can spot the problem rows at a glance.
What happens if my text has a broken %-sequence like %ZZ?
It is passed through exactly as typed and flagged — never deleted, and never turned into a blank output. %ZZ is not valid hexadecimal, so there is nothing correct to decode it to; the tool decodes every valid %XX run around it and leaves the broken part untouched so you can fix it yourself.
Is my data sent to a server?
No. Encoding, decoding, and analysis all run in your browser with JavaScript — nothing is uploaded, stored, or logged. That makes the tool safe for URLs containing API keys, session tokens, or other secrets you would never paste into a server-side tool.
Worked example
Encoding a search URL: input https://example.com/search?q=hello world&lang=en with encodeURIComponent gives https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den — every reserved character escaped, safe to embed as a single API parameter value. With encodeURI the same input gives https://example.com/search?q=hello%20world&lang=en — structure intact, only the space encoded.
Decoding: paste https://example.com/p?name=%C3%89mile%20Claire in Decode mode and you get https://example.com/p?name=Émile Claire — %C3%89 is the two-byte UTF-8 encoding of É.
Analyzer: https://example.com:8080/shop?q=red%20shoes#reviews splits into protocol https:, host example.com, port 8080, path /shop, query parameter q = red shoes (decoded), and fragment reviews.