Skip to content
Robert Askam

URL Encoder

Percent-encode text for use in a URL online. Encode a single query value or path segment, or a whole URL while keeping its structure.

How to use it

Paste text and pick Component to encode a query value or path segment, or Full URL to keep characters such as : / ? & = and # intact.

About this tool

URLs can only carry a limited set of characters. Percent-encoding replaces the rest with a % and two hex digits, so a space becomes %20.

Frequently asked questions

What is the difference between Component and Full URL?
Component mode encodes everything except letters, digits and - _ . ! ~ * ' ( ), like encodeURIComponent, and suits a query value or path segment. Full URL mode leaves characters such as : / ? & = and # alone, like encodeURI.
How is a space encoded?
As %20. Some form encodings use + for a space, but %20 is correct in any part of a URL.
Which characters need encoding?
Anything outside the unreserved set: letters, digits and - . _ ~. Reserved characters such as ? & and = must be encoded when they are part of a value rather than the URL structure.
Does it encode non-ASCII text?
Yes. Characters are converted to UTF-8 and each byte is percent-encoded.