URL Encoder / DecoderOn-device processing

Preparing your tool…

How to use it

  1. 01Paste a component or percent-encoded text.
  2. 02Choose Encode or Decode.
  3. 03Review and copy the result.

Escape one component at the right boundary

Component encoding prevents characters in a value from being mistaken for URL separators. It is appropriate for a query value or single path component, not for escaping an entire assembled URL. The decoder rejects malformed percent escapes instead of guessing missing data.

This uses encodeURIComponent and decodeURIComponent conventions. A literal plus sign is not automatically a space, unlike some form-encoding rules. Encoding an already escaped value can create a second layer; keep raw and encoded versions separate.

Practical check: A&B becomes A%26B. Encoding that output again produces A%2526B.

Useful details and limits

Encoding uses encodeURIComponent, which escapes separators such as slash, question mark and ampersand. Use it for an individual value, not an entire URL. Decoding uses decodeURIComponent and rejects malformed percent sequences or invalid UTF-8. Plus signs remain plus signs; this does not implement form-urlencoded plus-to-space conversion. Input is limited to two million characters.

Questions about this tool

Should I paste a whole URL?

Use a component, such as a query parameter value. Encoding an entire URL also escapes its structural separators.

Why does a plus sign stay unchanged when decoding?

This follows decodeURIComponent. A plus sign means space only in certain form-encoding conventions.

Understand the workflow