URL Encode

Encode and decode URL components

Input
Output

What is URL / percent encoding?

URLs can only contain a small set of ASCII characters. Anything else — spaces, accented letters, emoji, reserved characters like `&`, `=`, `?` — must be percent-encoded as `%` followed by two hex digits representing the UTF-8 bytes. A space becomes `%20`, `é` becomes `%C3%A9`, the question mark becomes `%3F`.

Use 'component' encoding when escaping a single piece (a query parameter value, a path segment) — equivalent to JavaScript's `encodeURIComponent`. Use 'full URL' encoding when escaping a whole URL that already has structural delimiters you want to preserve — equivalent to `encodeURI`.

Use cases

  • Build query strings — percent-encode user input before stuffing it into `?q=` parameters.
  • Inspect server logs — decode mangled URLs to read the original path (`/Users/%E4%B8%AD%E6%96%87/...`).
  • Debug OAuth redirects — paste a `redirect_uri` to see exactly what the OAuth callback decoded to.
  • Read curl examples — copy a percent-encoded URL from a tutorial and decode it to understand the request.

Examples

InputResult
hello world & friendshello%20world%20%26%20friends
café/menu?id=123caf%C3%A9%2Fmenu%3Fid%3D123 (component) or caf%C3%A9/menu?id=123 (full URL)

Frequently asked questions

What's the difference between encodeURI and encodeURIComponent?

`encodeURI` leaves URL structural characters (`:`, `/`, `?`, `#`, `&`, `=`) untouched — for encoding a whole URL. `encodeURIComponent` escapes those too — for encoding a single piece that goes into a URL.

Can it handle non-ASCII characters?

Yes. Characters outside ASCII are encoded as their UTF-8 bytes (1–4 bytes), each represented as `%XX`.

Is `+` interpreted as a space when decoding?

No. This tool uses standard URL decoding, which leaves `+` unchanged. The `+`-means-space rule is specific to `application/x-www-form-urlencoded` form data, and this tool has no separate form-decode mode.

Why does my URL break after encoding?

You encoded structural characters (`:`, `/`, `?`, `#`) that needed to stay literal. This tool always does component encoding (`encodeURIComponent`), which escapes them — so encode only the individual query values or path segments, not the whole URL.

Is anything uploaded?

No — encoding and decoding run entirely in your browser.