URL Encoder

Percent-encode text so it is safe to use in URLs and query strings.

  • Runs in your browser
  • Free, no sign-up
Type text to start

About the URL Encoder

URLs can only contain a limited set of characters. Spaces, accented letters, emoji and symbols such as &, ? and # have to be written as percent codes, like %20 for a space. The URL Encoder does that for you: type or paste text and the encoded version appears as you type.

There are three modes, because what needs encoding depends on where the text goes. Parameter value encodes everything that could break a query string, which is what you need for a search term or a redirect address. Whole URL keeps the slashes, question marks and ampersands that give a URL its structure. Form data encodes like an HTML form, with + for spaces.

Text is encoded as UTF-8, the standard for the web, so every language and emoji works. You can also encode a list one line at a time. Everything runs in your browser.

How to use it

  1. Type or paste your textEnter a word, a search term, a parameter value or a complete URL. Sample loads a short phrase with an accent, an ampersand and a euro sign.
  2. Pick the modeParameter value for a single value, Whole URL for a complete address, or Form data when you need + for spaces.
  3. Use strict encoding if neededTurn on "Also encode ! ' ( ) *" for systems that require these characters to be encoded too, such as OAuth signatures.
  4. Encode lists line by lineTurn on "Each line separately" to encode many values at once and keep one value per line.
  5. Copy the resultThe status line counts the percent codes and shows the length before and after. Copy or download the result.

Key features

Three encoding modes

Parameter value (encodeURIComponent), Whole URL (encodeURI) and Form data (application/x-www-form-urlencoded).

UTF-8 everywhere

é becomes %C3%A9, € becomes %E2%82%AC and 👍 becomes %F0%9F%91%8D, the same as in every browser.

Strict mode

Optionally encodes ! ' ( ) * as well, following RFC 3986 to the letter.

Line by line

Encode a list of values in one go, without turning the line breaks into %0A.

Clear statistics

See how many characters were escaped and how much longer the text became.

Private by design

Nothing is uploaded. Encoding happens in your browser.

Examples

One phrase, three modes

The sample text is café & croissants: 2 for €5!

Parameter value:

caf%C3%A9%20%26%20croissants%3A%202%20for%20%E2%82%AC5!

Whole URL:

caf%C3%A9%20&%20croissants:%202%20for%20%E2%82%AC5!

Form data:

caf%C3%A9+%26+croissants%3A+2+for+%E2%82%AC5%21

Parameter value encodes the & and the colon, so they cannot be mistaken for URL syntax. Whole URL leaves them alone. Form data uses + for spaces and also encodes the exclamation mark.

Encoding a whole URL versus a parameter

Take this address with spaces and an accent in the search term:

https://example.com/search?q=café au lait&lang=en#top

Whole URL gives a working link:

https://example.com/search?q=caf%C3%A9%20au%20lait&lang=en#top

Parameter value encodes the slashes, ?, = and & too, which is what you want only when the whole address is itself a parameter, such as a redirect target:

https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dcaf%C3%A9%20au%20lait%26lang%3Den%23top

Common characters

InputParameter value
Tom & JerryTom%20%26%20Jerry
a+b=ca%2Bb%3Dc
2026/10/062026%2F10%2F06
👍%F0%9F%91%8D

Strict encoding

With "Also encode ! ' ( ) *" on, it's (really) *great*! becomes it%27s%20%28really%29%20%2Agreat%2A%21. Without it, those five characters would stay as they are.

Tips

  • Encode each parameter value separately, then put the URL together. Encoding a finished URL with Parameter value breaks it; encoding it with Whole URL leaves & and = inside values unprotected.
  • A plus sign means a space only in form data. If a value contains a real +, as in a phone number or "C++", encode it so it arrives as %2B.
  • Use Each line separately to prepare a list of search terms, product names or redirect targets for a spreadsheet or a script.
  • If a value is already encoded, do not encode it again. %20 would become %2520, and the receiving side would see the code instead of a space. The URL Decoder shows whether a value is encoded.
  • For building links with tracking parameters, the UTM Builder encodes every value for you.

Common mistakes and limits

  • Encoding a whole link as a parameterParameter value turns https:// into https%3A%2F%2F, so the result no longer works as a link. Use Whole URL for complete addresses.
  • Expecting Whole URL to protect valuesWhole URL keeps & = ? and # as they are. A value like "Tom & Jerry" inside a URL then splits into two parameters. Encode such values as Parameter value first.
  • Mixing up %20 and +In a path, + is a real plus sign, and only %20 means a space. Use + only for query strings sent as form data.
  • Encoding twiceRunning encoded text through the encoder again turns every % into %25. Check the input first if you see %25 in your results.
  • Pasting text with broken charactersText cut in the middle of an emoji contains half a character, which cannot be encoded. The tool shows an error; remove the broken character and try again.

Frequently asked questions

What is URL encoding?
Also called percent-encoding, it replaces characters that are not allowed in a URL with a % sign followed by two hexadecimal digits for each byte. A space becomes %20, and é, which is two bytes in UTF-8, becomes %C3%A9.
Which characters are not encoded?
Letters A to Z and a to z, digits, and - _ . are never encoded, and ~ is kept in every mode except Form data, which writes it as %7E like HTML forms do. Parameter value also leaves ! ' ( ) * unless you turn on strict encoding. Whole URL additionally keeps characters with a meaning in URLs, such as : / ? # & = and +.
What is the difference between Parameter value and Whole URL?
Parameter value encodes everything except letters, digits and a few safe symbols, so a value can never break the URL around it. Whole URL keeps the characters that structure a URL, so you can encode a complete address and it still works.
When should I use + instead of %20 for spaces?
When you send data the way an HTML form does (application/x-www-form-urlencoded), for example in a POST body or a classic search query. Everywhere else, %20 is the safe choice.
Why does é become %C3%A9 and not %E9?
Modern URLs use UTF-8, where é is two bytes, C3 and A9. %E9 is the old Latin-1 form, which current browsers and servers no longer expect.
What does strict encoding do?
It also encodes ! ' ( ) and *, which JavaScript leaves alone but RFC 3986 reserves. Some APIs, such as OAuth 1.0 signatures, need them encoded.
Can I encode many values at once?
Yes. Put one value per line and turn on Each line separately. Without it, the line breaks are encoded too, as %0A.
Is my text sent anywhere?
No. Percent-encoding happens on your device, and the text is never uploaded.