URL Encoder

Percent-encode a value for use in a URL path, query or form body.

Encoding Runs in your browser Shareable link
Value
Encoded

Nothing encoded yet

Paste a value to see it encoded for each context — query parameter, full URL and form body — side by side.

Runs entirely in your browser. Your data isn't uploaded — this page makes no network request with anything you type, which you can verify in your browser's network tab. How this works.

What is the URL Encoder?

Percent-encoding replaces characters that have structural meaning in a URL with a %XX sequence, so a value can be carried safely inside a path, a query string or a form body. The catch is that the correct rules differ by position — the same string needs different treatment in a path segment and a query parameter.

This tool exposes those contexts explicitly instead of making you guess, so you can see how one value encodes for each destination.

How to use it

  1. Paste the value you want to encode.
  2. Choose the context: query parameter, path segment, full URI or form body.
  3. Press Encode (or Ctrl/Cmd + Enter).
  4. Copy the encoded value into your URL.

Example

The same value encoded for three different contexts.

Input
filter=status:open & assignee=me
Result
component  filter%3Dstatus%3Aopen%20%26%20assignee%3Dme
full URI   filter=status:open%20&%20assignee=me
form       filter%3Dstatus%3Aopen+%26+assignee%3Dme

Features

  • Component mode (encodeURIComponent) for parameters and path segments
  • Full-URI mode (encodeURI) that preserves reserved structural characters
  • Form mode, which encodes spaces as + for application/x-www-form-urlencoded
  • Optional strict RFC 3986 mode, which also encodes ! ' ( ) *
  • Side-by-side comparison of every mode for the same input

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?
encodeURI assumes you are encoding a whole URL and leaves : / ? # & = intact. encodeURIComponent assumes you are encoding one value and escapes those too. Use component encoding for anything you are inserting into a URL.
Should a space become %20 or +?
%20 everywhere in a URL. The + form is specific to application/x-www-form-urlencoded bodies and legacy query strings; using it in a path will not be decoded as a space.
Do I need to encode a slash?
Only when it is part of a value rather than a path separator. A file name containing a slash must be encoded as %2F, and note that some servers reject or normalise encoded slashes in paths.
Esc

Loading the catalog…