URL Encode / Decode
Encode or decode URLs and query parameters. Handles special characters and Unicode properly.
About URL Encode / Decode
A URL encoder/decoder converts text between plain text and percent-encoded format for use in URLs. URLs can only contain a limited set of ASCII characters — any character outside this set (spaces, special characters, Unicode characters, etc.) must be percent-encoded as %XX where XX is the hexadecimal representation of the character's byte value. This is essential for passing query parameters, form data, and path segments that contain special characters.
How to Use
For encoding: paste your text into the input area and click 'Encode'. For decoding: paste your encoded URL or parameter and click 'Decode'. The tool handles full URLs, query strings, or individual parameter values. It automatically encodes spaces as either %20 or + (configurable) and correctly handles Unicode characters by converting them to UTF-8 bytes first.
Formula / Key Equations
Percent encoding: each non-allowed character is replaced by %XX, where XX is the hex value of the byte. For example, space becomes %20, & becomes %26, / becomes %2F. Unicode characters are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, the Euro sign becomes %E2%82%AC (three UTF-8 bytes).
Common Use Cases
Encoding query parameters in API requests. Passing special characters in URLs. Encoding form data for POST requests. Creating URLs with non-ASCII characters (internationalized URLs). Debugging URL encoding issues in web applications. Encoding/decoding OAuth parameters.
Limitations
The tool encodes/decodes individual values or full URLs. When encoding a full URL, be careful not to double-encode characters that are already encoded. The tool handles UTF-8 encoding but does not encode the reserved characters ;,/?:@&=+$# by default when encoding full URLs (they have special meaning in URL structure).
Frequently Asked Questions
What characters need to be URL-encoded?
In URL query parameter values, encode spaces, quotes, angle brackets, hash symbols, ampersands, equals signs, question marks, and any non-ASCII characters. Reserved characters like /, ?, #, & have special meaning in URL structure and should only be encoded when they appear in parameter values, not in the URL structure itself.
Why is my URL showing %20 instead of spaces?
%20 is the percent-encoded representation of a space character. Some systems also accept + for spaces in query strings (application/x-www-form-urlencoded format). When building URLs programmatically, always percent-encode spaces as %20 for the path component and either %20 or + for query parameters.
What is double encoding?
Double encoding occurs when already-encoded text gets encoded again. For example, %20 (encoded space) encoded again becomes %2520 (%25 is the encoding of %). This is a common bug in web applications that causes incorrect URLs. Always decode first if you suspect double encoding.
How do I handle Unicode characters in URLs?
Unicode characters are converted to UTF-8 bytes, then each byte is percent-encoded. For example, the Chinese character for 'hello' becomes %E4%BD%A0%E5%A5%BD. Modern browsers typically display Internationalized Domain Names (IDNs) in their native characters but encode them internally as Punycode.
Should I encode the entire URL or just the parameters?
Typically, encode only the parameter values, not the entire URL. Encoding characters like /, ?, =, and & that are part of the URL structure would break the URL. However, if a parameter value itself contains these characters, they must be encoded.
Related Tools
JSON Formatter & Validator
Format, beautify, minify, and validate JSON data w...
Base64 Encode / Decode
Encode text to Base64 or decode Base64 to text. Su...
Regex Tester & Debugger
Test regular expressions in real-time with match h...
HTML to Markdown Converter
Convert HTML to clean Markdown or Markdown to HTML...
Code Diff Checker
Compare two code snippets side-by-side with highli...