URL Encoder / Decoder
Percent-encode or decode URLs and query strings, and inspect every part of a URL.
encodeURIComponent: for one query value or path segment. Escapes / ? & = # too.
URL breakdown
- Protocol
- https:
- Host
- example.com
- Path
- /search
- Fragment
- #results
| Parameter | Decoded value |
|---|---|
| q | café |
| crème | |
| lang | fr |
About this tool
URLs may only contain a limited set of ASCII characters. Everything else, such as spaces, accented letters, Chinese text, emoji, and characters that have a special meaning in a URL like & = ? #, must be percent-encoded: each byte of its UTF-8 form is written as % followed by two hex digits. A space becomes %20, é becomes %C3%A9, and 你 becomes %E4%BD%A0.
This tool encodes and decodes in the three ways browsers and servers actually use: encodeURIComponent for a single value, encodeURI for a whole URL, and form encoding for HTML form posts. It also breaks any URL into protocol, host, port, path and fragment, and lists every query parameter with its decoded value, which is handy when debugging tracking links and redirects.
How to use URL Encoder / Decoder
- Choose Encode or Decode.
- When encoding, pick the mode: Component for a query value or path segment, Full URL to keep the URL structure intact, or Form for application/x-www-form-urlencoded data.
- When decoding, keep "Treat + as space" on for query strings and form data. Turn on "Decode repeatedly" if the text was encoded twice (you will see %25 everywhere).
- Paste your text. The result updates as you type; use Swap to feed the result back in the other direction.
- Check the URL breakdown below the result to read each query parameter in plain text.
Examples
Encode a query value
a b&c=d/é (Component)
a%20b%26c%3Dd%2F%C3%A9
The & = and / are escaped, so the value cannot break the surrounding query string.
Form encoding
a b&c (Form)
a+b%26c
Decode UTF-8 and double encoding
%E4%BD%A0%E5%A5%BD · a%2520b
你好 · a b (two rounds)
%2520 is a space encoded twice: %25 is the percent sign itself.
encodeURIComponent vs. encodeURI vs. form encoding
- encodeURIComponent escapes everything except letters, digits and - _ . ~ (this tool also escapes ! ' ( ) *, as RFC 3986 recommends). Use it for each parameter value you put into a URL.
- encodeURI leaves the characters that structure a URL (: / ? # & = and a few more) alone. Use it only on a complete URL whose parts are already correct, for example to fix spaces in a path.
- Form encoding (application/x-www-form-urlencoded) is what browsers send when a form is submitted: like encodeURIComponent, but a space becomes + instead of %20. That is why "+" must be decoded as a space in query strings.
- A common bug is encoding twice, for example a value encoded by your code and then again by a library. The tell-tale sign is %2520 or %253D in the final URL.
Frequently asked questions
Everything you need to know about this tool and data security.
Should a space be %20 or +?
In the path of a URL always %20. In the query string both are accepted by most servers, because form encoding uses +. When in doubt, %20 is never misread.
Why do I get a "malformed" warning when decoding?
A % sign must be followed by two hex digits that form valid UTF-8. A stray % (as in "100%") or a cut-off sequence such as %E4%BD cannot be decoded. The tool decodes everything else and leaves the broken part unchanged.
Is URL encoding a form of encryption?
No. It is a reversible way of writing characters and offers no secrecy at all. Never put passwords or tokens in a URL expecting encoding to hide them.
Do Chinese or other non-English URLs need encoding?
Browsers display them readably, but on the wire they are always sent percent-encoded in UTF-8. When you build URLs in code or paste them into systems that only accept ASCII, encode them.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Encode text to Base64 or decode Base64 to UTF-8 text with instant live conversion.
Generate SHA-256, MD5 hashes, and convert URL, HTML entities, and Hex.
Prettify, validate, and minify JSON data instantly in your browser.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.