How to use the URL encoder
- Paste your text into Text or URL to encode.
- Choose Encode as: Component (a query value or path segment), Full URL (keeps : / ? # & =), or Form data (spaces as +).
- Tick Encode each line separately to encode a list of values in one go.
- Copy the Encoded result into your link, code or request.
What it does and when to use it
The punctuation in a URL has jobs to do. A ? starts the query, & separates parameters, = joins a name to its value, # starts the fragment and / separates folders. When those characters appear inside your data, they must be encoded, or the URL will be read wrongly. Spaces and non-English letters are not allowed in a URL at all, so they must be encoded too.
Use the encoder to:
- Build a search or tracking link whose values contain spaces, & or accented letters.
- Pass one URL inside another, for example a return address in a login or redirect link.
- Prepare form data for an API that expects application/x-www-form-urlencoded.
- Check what a library or browser will produce before you debug a broken link.
To read an encoded link, use the URL Decoder. For binary data or longer text in a URL, Base64URL is often a better fit. To build campaign links with UTM parameters encoded for you, try the UTM Builder.
How it works
The text is converted to UTF-8 bytes. Each byte that is not allowed to appear as-is is written as % followed by its value in hex. Which characters are left alone depends on the option:
- Component leaves only letters, digits and - _ . ! ~ * ’ ( ) as they are, just like JavaScript’s encodeURIComponent.
- Full URL also keeps the structural characters : / ? # & = and a few others, like encodeURI.
- Form data works like Component, but writes spaces as +, as HTML forms do.
Everything runs in your browser.
Worked examples
A value full of reserved characters. “a b&c=d/é” as a component becomes a%20b%26c%3Dd%2F%C3%A9. The space, &, =, / and é are all encoded, so the value can sit safely after = in a query string.
Tidying a full URL. “https://example.com/a b?x=1&y=é” with Full URL becomes https://example.com/a%20b?x=1&y=%C3%A9. The structure stays, and only the space and é change.
Form data. “fish & chips” with Form data becomes fish+%26+chips.
A percent sign. “50% off!” becomes 50%25%20off!, because % itself must be encoded as %25.
Limits and tips
- Encode each value on its own, then join them with & and =. Encoding a whole finished URL as a component turns its structure into data.
- Do not encode twice. Running already-encoded text through the encoder turns %20 into %2520.
- Domain names with non-Latin letters use a different system called Punycode, not percent-encoding.
Frequently asked questions
Which option should I choose?
What is the difference between encodeURIComponent and encodeURI?
Should a space be %20 or +?
Why does é become %C3%A9?
Do I need to encode a URL that I put inside another URL?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.