Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Percent-encode or decode a URL or query string.
URLs can only safely contain a limited set of characters -- spaces, special symbols, and non-ASCII characters need to be "percent-encoded" (like a space becoming %20) before they can be safely included in a link or query string. This tool encodes and decodes URLs, with two distinct modes for two genuinely different situations.
Choose Encode or Decode, then select a mode: "Standard" (for encoding a complete URL, leaving structural characters like :/?# untouched) or "Component" (for encoding a single value -- a query parameter or path segment -- where every special character including those structural ones should be encoded). Enter your text and the result appears instantly.
Standard mode uses encodeURI/decodeURI -- appropriate for a full URL, since it preserves characters like :, /, ?, and # that give the URL its structure.
Component mode uses encodeURIComponent/decodeURIComponent -- appropriate for a single query parameter or path segment value, since it encodes everything, including characters that would otherwise be misread as URL structure.
Using the wrong mode is a common source of broken links: encoding a query parameter value with "Standard" mode won't escape an & or = inside it, which can corrupt the query string it's embedded in.
Developers building a query string parameter that might contain spaces, ampersands, or special characters. Debugging a URL that isn't working, by decoding it to see its real, human-readable content. Encoding a value to safely embed in a link without breaking its structure.
Percent-encoding replaces an unsafe character with a percent sign followed by two hexadecimal digits representing its UTF-8 byte value. A space becomes %20, a question mark inside a value becomes %3F, and an ampersand becomes %26. Non-English letters and emoji are first converted to their UTF-8 bytes, so a single character can become several encoded triplets. For example, the letter e with an acute accent turns into %C3%A9. Letters, digits, and a few marks such as hyphen, underscore, period, and tilde are left as they are in both modes.
Imagine you need a link to a page that takes a search term: https://example.com/search?q=TERM, where the search term is "cats & dogs = pets". First encode only the term using Component mode, giving cats%20%26%20dogs%20%3D%20pets. Then place it after the equals sign of the query. If you had used Standard mode on the term, the ampersand and equals sign would have stayed as they were, and the receiving server would read them as separators between parameters, splitting your one value into several broken ones. The rule of thumb is simple: encode the pieces, not the whole URL, and use Component mode for each piece.
A frequent bug is encoding a value twice. If the text already contains %20 and you encode it again, the percent sign becomes %25 and you end up with %2520, which decodes back to the literal text %20 instead of a space. If you see %25 in a link, decode once to check. Another pitfall is the plus sign: in HTML form submissions a plus can stand for a space, but encodeURIComponent encodes a real plus as %2B and a space as %20, so be aware of how the receiving system interprets each. Also keep the fragment (the part after #) in mind, since it is never sent to the server.
Decode mode is useful for making tracking links, redirect parameters, and error-page URLs readable. Decode the whole thing in Standard mode to see the structure, then decode individual parameter values in Component mode if some pieces are still unreadable.
Use Component mode -- it encodes everything, including characters like & and = that would otherwise be misinterpreted as query string structure if they appeared inside your parameter's actual value.
The tool shows a clear error message rather than a confusing crash or garbled output, since malformed percent-encoding (like a stray % not followed by two hex digits) can't be decoded unambiguously.
The value was encoded twice. Decode it once and compare, then make sure you only encode raw text one time.
Encode only the values that might contain special characters, using Component mode, then assemble the URL. Encoding an entire URL in Component mode would also change the colon and slashes.
They are converted to UTF-8 bytes, and each byte becomes a percent-encoded pair, so one character may produce several triplets.
Only in some form-encoded contexts. This tool encodes a space as %20 and a plus as %2B, which is the safest reading for most modern URLs.
Reference: NIST Weights and Measures