URL encoder

Make text safe to use inside a URL.

Runs in your browser. Nothing you type is sent anywhere.

How to URL encode text

  1. Paste the text or URL.
  2. Pick component encoding for a single value, or full URI for a whole address.
  3. Copy the encoded result.

What gets encoded

CharactersEncoded?Example
Letters and digitsNoa-z, A-Z, 0-9 stay as they are
- _ . ~NoLeft alone in both modes
SpaceYes%20, or + with the option on
/ ? # & =Only in component modeFull URI mode leaves these alone

Component mode vs full URI mode

ModeEncodes / ? # & =Use for
ComponentYesOne query value or path segment
Full URINoA complete address you are about to use as-is

When you need percent-encoding

  • A query string value that contains spaces or special characters, such as a search term.
  • Non-ASCII text in a URL, like accented letters or another script, once it is turned into UTF-8 bytes.
  • Building a redirect or callback link that carries another full URL inside one parameter.

URL encode FAQ

What is the difference between component and full URI encoding?

Component encoding escapes every special character, including / and &, for use inside one query parameter. Full URI encoding leaves URL structure characters like :, / and ? alone, since they are part of a valid address.

When should I use plus for space?

Only for classic form submissions (application/x-www-form-urlencoded), where a space is written as + instead of %20.

Which characters get encoded?

Letters, numbers and - _ . ~ stay as they are. Everything else becomes a percent sign followed by its two-digit hex code.

Does this follow a web standard?

Yes. RFC 3986 defines which URI characters are reserved and how to percent-encode the rest. This tool uses JavaScript's built-in encodeURIComponent and encodeURI, which both follow it.

How are accented letters or emoji encoded?

They are converted to UTF-8 bytes first, then each byte is written as %XX. The letter e (with an accent) becomes %C3%A9, since it takes two UTF-8 bytes.

Can I encode a whole address, including https://?

Use full URI mode. It leaves the scheme, host and the / that separates path segments alone, and only encodes characters that are never safe anywhere in a URL.

Does encoding change letters and digits?

No. A-Z, a-z and 0-9 are never encoded in either mode, since they are always safe to use directly inside a URL.

What is the difference between the two JavaScript functions behind this tool?

Component mode uses encodeURIComponent, which escapes everything except unreserved characters, meant for one value like a query parameter. Full URI mode uses encodeURI, which also leaves reserved URL structure characters alone, since it expects a complete address.

Related tools