Toolza guides / developer

Encode URL Components Without Breaking Links

Encode an individual parameter value differently from an already structured URL, then verify the resulting link.

Use the interactive tool ↓

Decide what the input represents

A complete URL contains structural separators such as :, /, ?, & and =. A parameter value may contain those same characters as data. The tool’s component option uses encodeURIComponent/decodeURIComponent; the full-URL option uses encodeURI/decodeURI.

Try it here

URL Encoder / Decoder

Processed on your device. Your files never leave your browser.
Open the standalone URL Encoder / Decoder tool →

Encode one parameter value

With Encode and the component option enabled, enter a+b & c. The expected output is a%2Bb%20%26%20c. This representation preserves the literal plus sign and ampersand as data rather than query structure.

For example, a search value containing red & blue must not be appended unencoded after ?q= or the ampersand can be interpreted as another parameter separator. Encode the value once, then combine it with the structural part of the URL in the receiving application.

  1. Identify whether you have a value or an entire URL.
  2. Select the corresponding option and direction.
  3. Check an easy value before using a long address.
  4. Open the intended test link and inspect the destination’s parsed parameters.

Preserve structure when needed

Full-URL encoding intentionally leaves some reserved separators intact. Full-URL decoding likewise differs from component decoding for reserved escapes. It is therefore normal for the two options to produce different outputs from the same text.

These JavaScript URI functions are not identical to HTML form encoding. In particular, this decoder does not automatically turn a literal + into a space. Check the conventions used by the source application rather than replacing plus signs indiscriminately.

Avoid double encoding

If a value already contains %20, encoding it again can turn % into %25 and produce %2520. Repeated encoding is only correct when another explicit transport layer requires it. Preserve the original raw value and keep track of which layer owns escaping.

Percent encoding is not encryption, HTML escaping, or a general defence against malicious input. The receiving system must validate and use decoded data safely in its own context.

Troubleshoot a decoding error

Look for a stray %, incomplete hexadecimal escape or invalid encoded UTF-8 sequence. Do not blindly repeat Decode until a result looks readable. For a website QR code, finalize and test the actual URL first, then use QR Code Generator to encode that final destination.