URL Encoder & Decoder
Percent encode text for use in one part of a web address, or decode percent encoded text.
Result
How it works
Encoding uses percent encoding, the same rules as the JavaScript function encodeURIComponent. Each character is replaced by a percent sign and the hexadecimal value of its UTF-8 bytes, so a space becomes %20 and an accented letter or emoji becomes several %XX groups. Letters, digits and the hyphen, underscore, full stop, exclamation mark, tilde, asterisk, apostrophe and brackets are left alone.
Slashes, question marks, hash signs, ampersands and equals signs are encoded as well, so use this on a part of an address such as a query value, not on a whole address. Encoding a whole address would stop it working.
Decoding turns %XX groups back into text. A plus sign stays a plus sign, because reading it as a space is a rule for HTML form data and not for addresses. A percent sign that is not followed by two hexadecimal digits, or escapes that do not form valid UTF-8, are reported as errors and nothing is repaired.
What this result means
The result is your text percent encoded or decoded, using the rules for one part of a web address.
Examples
- "a b&c" encoded: a%20b%26c
Common mistakes
- Encoding a whole address. Its slashes and colon would be encoded too, and it would stop working.
