URL Encoder / Decoder
Encode URL components safely and decode encoded URL strings instantly.
What is URL Encoder / Decoder?
URL Encoder / Decoder converts special characters in URLs to percent-encoded format (e.g. spaces become %20)
and decodes percent-encoded strings back to readable text.
Proper URL encoding ensures that query parameters and path segments are transmitted correctly by browsers and servers.
How to use
- To encode: paste a string with special characters and click Encode.
- To decode: paste a percent-encoded string and click Decode.
- Copy the result with the Copy button.
Notes
- This tool encodes component parts of a URL (e.g. query values), not full URLs. Encoding a full URL would break the
://and/delimiters. - Safe characters (letters, digits,
-,_,.,~) are not encoded. - Spaces can be encoded as
%20(RFC 3986) or+(form encoding). This tool uses%20.
FAQ
- What is the difference between encodeURI and encodeURIComponent?
encodeURIencodes a full URL and leaves structural characters like/,?, and#intact.encodeURIComponentencodes a URL component (query value, path segment) and percent-encodes those structural characters. This tool usesencodeURIComponentbehavior.- Why do I need to encode URL parameters?
- Characters like
&,=, and spaces have special meaning in URLs. If a query value contains those characters without encoding, the URL is misinterpreted by the server. - Can I encode non-ASCII characters?
- Yes. Non-ASCII characters (like Japanese or Arabic letters) are first converted to UTF-8 bytes, then each byte is percent-encoded.
Overview
Safely encode URL components and decode encoded strings. Useful for query parameters and troubleshooting broken links.
How to use
- Paste source string.
- Run encode or decode.
- Use the result in URL or app config.
Examples
-
Query value encode
Input: name=John Doe&city=Tokyo
Output: name%3DJohn%20Doe%26city%3DTokyo
-
Decode
Input: hello%20world
Output: hello world
Notes
- Encode components, not entire URLs, unless intended.
- Double encoding causes broken links.
- Reserved characters should be handled carefully.
FAQ
- Should I encode full URL?
- Usually no; encode only parameter values.
- Why does %2520 appear?
- That is double-encoding of %20.
- Is this reversible?
- Yes, if the original data and encoding are valid.
Embed this tool
Paste this iframe into any HTML page to embed URL Encoder / Decoder on your site: