Skip to content

URL Encode

Percent-encode a URL or query string, with component and full-URI modes plus optional form (+) encoding.

Input

Output

Percent-encoding, and which mode you need

A URL may only contain a limited set of ASCII characters. Everything else — spaces, non-Latin letters, and the reserved characters that give a URL its structure — has to be written as %XX escape sequences.

Which characters need escaping depends on where the value goes, which is why this tool offers three modes rather than one button.

  • Component: escapes &, =, ?, / and #. Use it for a single query value or path segment.
  • Full URI: leaves the reserved characters intact so an entire URL stays usable. Use it when encoding a complete address.
  • Form: the application/x-www-form-urlencoded rules, where a space becomes + instead of %20.

Frequently asked questions

When is a space %20 and when is it +?

Inside a URL path or a normal query value it is %20. In form-encoded POST bodies and in some legacy query strings it is +. Pick the Form mode when you need the latter.

Why do Korean, Japanese or emoji characters become long %-sequences?

They are first converted to UTF-8 bytes, and each byte becomes one %XX pair. A single Hangul syllable is 3 bytes, so it becomes 9 characters.

Related tools