Skip to content

URL Encoder / Decoder

Percent-encode text for URLs, or decode it back.

Output appears here.

Switch between encode and decode above, then type or paste your text. URL (percent) encoding replaces characters that are unsafe in a URL — spaces, `&`, `?`, `/`, and non-ASCII characters — with `%` escape sequences so they survive inside a query string or path segment.

This tool uses the browser’s `encodeURIComponent` and `decodeURIComponent`, which is the correct pair for encoding a single query-string value. Everything runs locally — nothing is sent to a server.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

`encodeURIComponent` encodes a single value — it escapes `&`, `=`, `?`, `/`, and more, so it is right for a query-string parameter. `encodeURI` is for encoding a whole URL and deliberately leaves those structural characters intact. This tool uses `encodeURIComponent`, the one you want for a value.

Why does a space become %20 or +?

In a path or with percent-encoding, a space becomes `%20`. In the older `application/x-www-form-urlencoded` form-body format, a space is encoded as `+`. This tool produces `%20`, which is valid everywhere in a URL.