URL Encoder & Decoder

By the ToolPocket team · Updated 2026-12-05 · Editorial standards

URLs can only contain a limited set of characters. Spaces, ampersands, hash marks and non-ASCII letters must be percent-encoded before they can be safely placed in a query string or path, otherwise the URL will break or change meaning.

This tool offers both component encoding, which encodes everything except unreserved characters, and full-URL encoding for complete addresses.

Runs locally in your browser — nothing is uploaded.

How to use the URL Encoder & Decoder

  1. Pick the encoding style: component or full URL.
  2. Paste the text or URL to encode or decode.
  3. Press Encode or Decode, then copy the result.

Frequently asked questions

When should I use component encoding?

Use component encoding for individual query parameter values. It encodes characters such as &, =, ? and / that would otherwise be interpreted as URL syntax.

Why does decoding fail sometimes?

A percent sign must be followed by two hexadecimal digits. If the string contains a literal % that was not encoded, or an incomplete %-escape, the decode operation will fail.

Should I use + or %20 for spaces?

In standard URLs use %20. The + sign is only interpreted as a space in application/x-www-form-urlencoded form data and some query parsers.

Good to know

Percent-encoding rules depend on where in a URL the text goes. A query parameter value must escape &, = and #, while a whole URL should keep its separators intact. Encoding the wrong scope produces links that look right and break when clicked.

Double encoding is the classic trap: encoding an already encoded string turns %20 into %2520. Decode once if you are unsure, then re-encode exactly once at the boundary where the value enters the URL.