Tool

URL Encoder / Decoder

Percent-encode or decode URL text, for whole URLs or single components.

Try it

This tool runs entirely in your browser. Nothing you type or paste is sent anywhere.

Result
a%3D1%26b%3D2
a%3D1%26b%3D2

Percent-encoded the input using component rules.

How it works

Usage

  1. Choose encode or decode.
  2. Choose component mode for query values, or whole-URL mode for a complete URL.
  3. Paste the value and read the result.

Examples

Encode a query value

{
  "mode": "encode",
  "value": "a=1&b=2",
  "component": true
}

Decode an escaped value

{
  "mode": "decode",
  "value": "caf%C3%A9",
  "component": true
}

Limitations

Why two modes exist

encodeURI and encodeURIComponent differ in which reserved characters they escape. Picking the wrong one either breaks a URL's structure or leaves a value ambiguous. Component mode is the safe default for values, which is why it is preselected.

Frequently asked questions

When should I use component mode?
Use it for any single query-string value or path segment. Use whole-URL mode only when you are encoding a complete, already-structured URL.

Sources

  1. RFC 3986: Uniform Resource Identifier (URI): Generic Syntax — IETF