URL Encoder/Decoder
URL encoding/decoding tool. Encode text data to URL format or decode URL-encoded data to text. You can process data up to 5120 characters.
Data to encode
Result
Read Only
How to use
About this tool
Encodes and decodes URL percent-encoding in the browser.
How to use
Switch encode/decode, enter or paste a string; the result updates in real time.
Options
Direction: Switch between Encode (string→percent-encoded) and Decode (percent-encoded→string).
Use cases
• Building query strings • Encoding Japanese in URLs • Decoding encoded URLs • Safe API parameters
Code Examples
JavaScript
Read Only
1encodeURIComponent("hello 世界"); // "hello%20%E4%B8%96%E7%95%8C"
2decodeURIComponent("hello%20world"); // "hello world"Python
Read Only
1from urllib.parse import quote, unquote
2
3quote("hello 世界")
4unquote("hello%20world")PHP
Read Only
1rawurlencode("hello 世界");
2rawurldecode("hello%20world");Privacy and data
Processing is in-browser; input is not sent to a server.
FAQ
- Q: What is URL percent-encoding?
- A: Percent-encoding (also called URL encoding) replaces characters that are not allowed in URLs with a "%" followed by two hexadecimal digits. For example, a space becomes %20 and "世界" becomes %E4%B8%96%E7%95%8C.
- Q: What is the difference between encodeURI and encodeURIComponent?
- A: encodeURI encodes only characters that are illegal in a full URL, leaving reserved characters (/, ?, &, =, etc.) intact. encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ), making it safe for use as a query parameter value.
- Q: Should I encode the entire URL or just the query parameters?
- A: Only encode the values within query parameters and path segments. Encoding the entire URL (including scheme, host, and slashes) will break it.
- Q: Why do some spaces appear as "+" instead of "%20"?
- A: The "+" sign represents a space in the application/x-www-form-urlencoded format used by HTML forms. In modern URLs, %20 is preferred and unambiguous.
- Q: Does this tool send my data to a server?
- A: No. All encoding and decoding is performed entirely in the browser. Your data is never sent to any server.
