URL Encoder
Get text safely percent-encoded for a URL, query value or form.
- Runs in your browser
- No uploads
- No account
Loading your browser tool…
What URL Encoder does
Characters such as &, ?, #, spaces and accented letters can't go into a URL as they are; they have to be written as %XX codes. Which ones need encoding depends on where the text is going, which is why the encoder has three modes rather than one.
Query value encodes almost everything, like JavaScript's encodeURIComponent, for a single parameter value or path segment. Full URL keeps the structure of an address intact and only encodes spaces and other unsafe characters, like encodeURI. Form (+) matches HTML form submissions, where spaces become +.
Example
Input
Q&A: pricing / plans?
Result
Q%26A%3A%20pricing%20%2F%20plans%3F
In Query value mode the &, colon, slash and question mark are all encoded, so the text can sit inside one parameter. Full URL mode would give Q&A:%20pricing%20/%20plans? instead.
How to use URL Encoder
- Type or paste the text to encode, or click Use example.
- Choose Query value, Full URL or Form (+) under Encode for; More options can encode each line separately.
- Click Copy.
Good to know
- Full URL mode won't fix a link whose query values contain & or =. Encode those values one at a time in Query value mode, or use the Query Parameter Builder.
- Text is always encoded as UTF-8. Old systems that expect Latin-1 (é as %E9) will read accented characters wrongly.
- Text that is already encoded gets encoded again, so %20 becomes %2520. Decode it first with the URL Decoder if you're not sure.
Questions about URL Encoder
What is URL encoding?
It replaces characters that aren't allowed, or have a special meaning, in a URL with a % sign and two hex digits per byte. A space becomes %20, & becomes %26, and é becomes %C3%A9 because it takes two bytes in UTF-8.
Should a space be %20 or +?
Use %20 in paths and in most query strings. The + form comes from HTML form submissions and only means a space inside a query string. Choose Form (+) when a system specifically expects form encoding.
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves the characters that structure a URL, such as / ? & = and #, so it suits a whole address. encodeURIComponent encodes those too, so it suits a single value. Full URL and Query value match them.
How do I put a URL inside another URL?
Encode the inner URL in Query value mode and use the result as the parameter value, for example ?next=https%3A%2F%2Fexample.com%2Fa. That stops its own ? and & from being read as part of the outer link.