How the URL Encoder works

Percent-encoding (RFC 3986) writes each byte that is not allowed in a URL as % followed by two hexadecimal digits. Text is converted to UTF-8 first, so é becomes %C3%A9 and becomes %E2%82%AC.

URL component mode works like JavaScript's encodeURIComponent: only letters, digits and - _ . ! ~ * ' ( ) are left as they are. Use it for a single query parameter value or path segment, where characters such as &, =, / and ? must be encoded so they are not read as URL structure. Tick Encode spaces as + to produce the application/x-www-form-urlencoded style used by HTML forms.

Full URL mode works like encodeURI: it also keeps ; , / ? : @ & = + $ #, so a complete address stays usable while spaces and non-ASCII characters are encoded. It does encode %, so do not run an already encoded URL through it again.

How to use the URL Encoder

  1. Type or paste the text or URL into the input box, or select Load example.
  2. Under Encode as, choose URL component to encode a single value, or Full URL to keep characters such as : / ? # & = that give a URL its structure.
  3. In URL component mode, tick Encode spaces as + if the value is for form data (application/x-www-form-urlencoded).
  4. Select URL encode, or press Ctrl + Enter (Cmd + Enter on a Mac), then copy or download the result.

Example

This text:

Café & Crème: 50% off / "Spring sale" #2026

is encoded as a URL component as:

Caf%C3%A9%20%26%20Cr%C3%A8me%3A%2050%25%20off%20%2F%20%22Spring%20sale%22%20%232026

In Full URL mode, https://example.com/search?q=café crème&page=2 becomes:

https://example.com/search?q=caf%C3%A9%20cr%C3%A8me&page=2

Common use cases

  • Building a query string by hand, for example a search term that contains &, = or spaces.
  • Adding a redirect or callback URL as a parameter inside another URL.
  • Encoding file names or path segments that contain spaces or non-English characters.
  • Preparing form-encoded request bodies for curl, Postman or an HTTP client.
  • Checking what encodeURIComponent or encodeURI will produce before writing the code.

Frequently asked questions

What is the difference between URL component and Full URL?

URL component matches JavaScript's encodeURIComponent and encodes every character except letters, digits and - _ . ! ~ * ' ( ). Full URL matches encodeURI and also keeps ; , / ? : @ & = + $ #, so a whole address still works. Use URL component for anything you insert into a URL, such as a parameter value.

Should spaces be %20 or +?

In paths and most URL parts a space must be %20. The + form only means a space in query strings and form bodies encoded as application/x-www-form-urlencoded, which is what Encode spaces as + produces. When in doubt, %20 is understood everywhere.

How are non-English characters encoded?

Each character is converted to its UTF-8 bytes and every byte is written as %XX. For example é becomes %C3%A9 and € becomes %E2%82%AC. This is the encoding browsers and web servers expect.

Why did my % signs turn into %25?

A literal percent sign must be encoded as %25 in both modes. If your input is already percent-encoded, encoding it again double-encodes it. Use the URL Decoder first if you are not sure.

Is my text sent anywhere?

No. Encoding happens in your browser and nothing you type is sent to our server.