URL Encoder/Decoder
Encode and decode URLs and query parameters. All processing happens in your browser.
Common URL Encodings
→%20&→%26?→%3F=→%3D#→%23/→%2F@→%40+→%2B🔒 Privacy First: All encoding and decoding happens in your browser using built-in JavaScript functions. No data is sent to any server.
How to Use
- Choose encoding mode: Component for values, Full URL for complete URLs
- Paste or type your URL/text in the input field
- Click Encode to URL-encode, or Decode to decode
- Copy the result or swap to continue editing
- For URLs with query strings, see parsed parameters below
About URL Encoding
URL encoding converts special characters into a format safe for URLs. This is necessary because URLs can only contain certain characters (letters, numbers, and a few symbols). Characters with special meaning in URLs (like ? & =) or unsafe characters (like spaces) must be encoded.
encodeURIComponent encodes everything except letters, numbers, and - _ . ! ~ * ` ( ). Use it for query parameter values. encodeURI preserves URL structure characters like : / ? # & =. Use it for complete URLs where you want to keep the structure.
Frequently Asked Questions
What is URL encoding?
URL encoding (also called percent encoding) converts special characters into a format that can be safely transmitted in URLs. Characters like spaces, &, ?, and = have special meanings in URLs, so they must be encoded as %20, %26, %3F, and %3D respectively.
What's the difference between encodeURI and encodeURIComponent?
encodeURI is used for encoding complete URLs and preserves characters that are valid in URLs (like :, /, ?, #, &). encodeURIComponent is more aggressive and encodes all special characters, making it suitable for encoding query parameter values that might contain URL-special characters.
When do I need to URL encode?
You need URL encoding when: passing user input in URLs, including special characters in query parameters, building URLs programmatically, sending data via GET requests, or when a URL contains non-ASCII characters like accented letters or emojis.
What characters need to be URL encoded?
Reserved characters that have special meaning in URLs need encoding: ! # $ & ' ( ) * + , / : ; = ? @ [ ]. Unsafe characters like spaces, < > {} | \ ^ ` also need encoding. Any non-ASCII characters (like e, n, Chinese characters) must be encoded.
Why does my URL show %20 instead of spaces?
%20 is the URL-encoded representation of a space character. URLs cannot contain literal spaces, so they are converted to %20 (or sometimes + in query strings). When decoded, %20 converts back to a space.
Is my data secure when using this tool?
Yes, all encoding and decoding happens entirely in your browser using JavaScript's built-in functions. Your URLs and data are never sent to any server, ensuring complete privacy for sensitive information.