How to use
- Choose Encode or Decode and type or paste your text. The result updates as you type.
- When encoding, pick what you are encoding: one value (such as a search term), a whole address, or form data where a space becomes +.
- When decoding, switch on the plus option if the text comes from an HTML form and a + means a space.
- Copy the result, or use it as the new input to check that decoding gets back the original.
Formula
Letters, digits and - . _ ~ are safe and stay as they are. Every other character is turned into its UTF-8 bytes and each byte is written as a percent sign and two hex digits (RFC 3986). One-value encoding also changes the reserved characters ; , / ? : @ & = + $ #, which have a meaning inside a URL.Example
The text hello world & more? becomes hello%20world%20%26%20more%3F. The Devanagari word नमस्ते becomes %E0%A4%A8%E0%A4%AE%E0%A4%B8%E0%A5%8D%E0%A4%A4%E0%A5%87, because each letter takes three UTF-8 bytes.
Percent-encoding makes text safe to put in a URL; it does not hide it. Spaces at the start and end are trimmed before converting. Decoding fails on a % that is not followed by two hex digits, or on bytes that are not valid UTF-8.