URL Encoder

Make text safe to put in a web address. Spaces, ampersands, accents and emoji are converted to percent codes such as %20, exactly as browsers expect.

  • Files stay on your device
  • Free, no sign-up
  • Instant
Quick guide · 4 steps

How to use the URL Encoder

When to use the URL Encoder

Building query strings

Safely add search terms, names or addresses to a URL, even when they contain spaces, & or #.

Redirect and callback URLs

Encode a full URL so it can be passed as a single parameter, for example in OAuth flows.

Campaign links

Encode UTM values that contain spaces or symbols so analytics records them correctly.

Non-English text in links

Turn Urdu, Arabic, Chinese or emoji text into a format every browser and server accepts.

Features and benefits

  • Component mode (like encodeURIComponent) and full-URL mode (like encodeURI)
  • UTF-8 percent-encoding for any language and emoji
  • Optional + for spaces in form-style query strings
  • Live output as you type
  • Character by character breakdown with Unicode, UTF-8 bytes and %XX code
  • Encode a list one line at a time
  • Warning when text is already encoded, to avoid %2520

Example

Input
coffee & tea / café
Output
coffee%20%26%20tea%20%2F%20caf%C3%A9

How the URL Encoder works

Component mode works like JavaScript’s encodeURIComponent: every character except letters, digits and - _ . ! ~ * ' ( ) is converted into UTF-8 bytes written as %XX. Full-URL mode works like encodeURI and leaves characters that structure a URL, such as : / ? & = and #, untouched, so a complete address keeps working. The form-style option writes spaces as + for application/x-www-form-urlencoded data.

A real-life example

A shop owner wants a WhatsApp link that opens with a ready message: “Hi! Is the blue kurta (size M) available?” Pasting the message in component mode gives Hi!%20Is%20the%20blue%20kurta%20(size%20M)%20available%3F, which she adds after https://wa.me/923001234567?text=. The link now opens WhatsApp with the full message, including the question mark, instead of cutting it off.

Good to know

URLs can contain only a limited set of characters. Others, spaces, &, #, accents and emoji, must be written as a percent sign followed by two hexadecimal digits for each UTF-8 byte.

Choosing the right mode matters. To build a link like ?q=VALUE, encode just the value with “Encode everything”; otherwise an & inside the value would start a new parameter. “Encode as full URL” is for tidying a whole address while keeping its structure.

What is percent encoding?

A web address may only contain a small set of characters. Anything else, such as a space, an ampersand or a letter from another alphabet, is first turned into bytes using UTF-8. Each byte is then written as a percent sign followed by two hexadecimal digits. That is why the official name is percent encoding, and why people also call it URL encoding.

CharacterUTF-8 bytesPercent-encoded
space20%20
&26%26
éC3 A9%C3%A9
ا (Urdu alif)D8 A7%D8%A7
😀F0 9F 98 80%F0%9F%98%80

Leave “Show how each character was encoded” switched on to see this breakdown for your own text.

Which characters are left alone

CharactersEncode everythingFull URL
A–Z a–z 0–9 - . _ ~KeptKept
! ' ( ) *EncodedKept
: / ? # @ & = + $ , ;EncodedKept
Spaces, quotes, %, [ ] and all other charactersEncodedEncoded

“Encode everything” follows the strict RFC 3986 rules, so the result is also safe for APIs and signature checks such as OAuth. Use “Full URL” to clean up a whole address without breaking its structure.

Tips for the best results

  1. Encode each parameter value separately, then join them with &, not the whole query string at once.
  2. Use full-URL mode only for complete addresses that already have the right structure.
  3. Use + for spaces only in form-style query strings; use %20 elsewhere.
  4. Decode the result with the URL Decoder to double-check it.

Common mistakes to avoid

Encoding twice

%20 becomes %2520 and the text shows literal % signs. Encode the original text only once.

Encoding a whole URL in component mode

The :// and / become %3A%2F%2F and the link breaks. Use full-URL mode.

Leaving & unencoded inside a value

The server will think a new parameter has started.

URL Encoder, frequently asked questions

Should spaces be %20 or +?

%20 works everywhere in a URL. The + sign means a space only in query strings sent by HTML forms. When in doubt, use %20.

What is the difference between the two modes?

“Encode everything” escapes reserved characters like / ? & = so the text can be a single value. “Encode as full URL” keeps them so the address still works.

Why does é become %C3%A9?

URLs use UTF-8, and é is two bytes in UTF-8 (C3 and A9). Each byte is written as a percent code.

How do I decode the result?

Use the URL Decoder.

Which characters must be encoded in a URL?

Spaces, quotes, < >, #, %, and any non-ASCII characters, plus & = ? / when they are part of a value.

Is URL encoding the same as percent-encoding?

Yes. Both names describe the same %XX format.

Do I need to encode URLs in HTML links?

Browsers fix many simple cases automatically, but encoding values yourself avoids broken links when text contains spaces, & or #.

How does percent encoding work for Urdu or Arabic text?

Each letter is turned into two UTF-8 bytes and each byte is written as %XX. For example, the Urdu alif ا becomes %D8%A7. Browsers show the readable letters again in the address bar.

Why did %20 turn into %2520?

The text was encoded twice. The % sign itself was encoded as %25, so %20 became %2520. The tool warns you when your input already contains percent codes, so you can decode it first.

Can I encode many values at once?

Yes. Paste one value per line and tick “Encode each line separately”. Each line is encoded on its own and the line breaks are kept.