URL Encoder
Encode and decode URLs and query strings.
How URL Encoder Works
What is URL Encoding?
URL encoding (also called percent-encoding) replaces unsafe or reserved characters in URLs with a % sign followed by their hexadecimal value. For example, a space becomes %20 and & becomes %26.
This ensures that URLs are transmitted correctly, since many characters have special meaning in the URL syntax (like ?, &, =, and /).
How to Use
- Paste a URL, text or an encoded string; the output updates as you type. Auto decodes input that contains
%XXescapes and no stray%, and encodes everything else. Encode and Decode fix the direction. - For encoding, pick what the input is: Component for a single value, Query String for key=value pairs, or Full URL for a whole address.
- For decoding form data, where
+stands for a space, set Plus sign to As space. - A malformed escape is reported with its position instead of being guessed at.
- The dice loads a random example to encode or decode, including form data and a broken escape.
Encoding Modes
| Component | Encodes everything except A-Z a-z 0-9 - _ . ~ ! * ' ( ), including %. Use for a single value. |
| Query String | Encodes each key and value on its own and keeps &, the = of each pair and the part before ? intact. Nothing is dropped. |
| Full URL | Encodes only what may not appear in a URL, such as spaces and non-ASCII. Reserved characters and existing %XX escapes stay, so it never encodes twice. |
Important Notes
- Spaces are always encoded as
%20, which every part of a URL accepts.+means a space only in form data. - Component encodes a
%again, so%20becomes%2520: that is right for a value that contains a literal%20, and wrong for text that is already encoded. Full URL and Query String keep existing escapes. - UTF-8 characters (like emoji or accented letters) are encoded as multi-byte sequences.
Privacy & Security: All encoding and decoding runs entirely in your browser. No data is sent to any server.
Mode
Encoding
Plus sign