URL Encoder

Encode special characters in URLs for safe use in links

What is it and how does it work?

A URL encoder converts text into percent-encoding, the format required to place special characters safely inside a URL. URLs only allow a limited set of characters: letters, digits and a few symbols. Everything else — spaces, accents, ampersands, question marks, emoji — must be encoded as a percent sign followed by hexadecimal bytes: a space becomes %20, "ñ" becomes %C3%B1. Without encoding, a stray & or ? in a query parameter silently breaks the URL by being interpreted as syntax instead of data.

This tool applies the same encoding browsers and HTTP libraries use (UTF-8 based, per RFC 3986) and the companion decoder reverses it. A subtle but critical distinction it helps with: encodeURIComponent encodes a single parameter value (including & and =), while encoding a full URL must leave its structure intact — mixing the two is one of the most common web bugs.

Common use cases

Frequently asked questions

When does a space become %20 and when +?

Both exist: %20 is the universal percent-encoding, while + represents a space only in the application/x-www-form-urlencoded format (HTML form submissions and often query strings). When in doubt, %20 is always safe; a literal + in data must be encoded as %2B.

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes everything special, including &, = and / — correct for individual parameter values. encodeURI leaves URL structure characters intact — meant for complete URLs. Using the wrong one either breaks the URL or corrupts the data.

Why do I see characters like %C3%B1 instead of one code?

Non-ASCII characters are first converted to UTF-8 bytes, then each byte is percent-encoded. "ñ" is two bytes in UTF-8, so it becomes %C3%B1. Multi-byte sequences are normal for accents, non-Latin scripts and emoji.

Can I encode an entire URL at once?

You can, but you usually shouldn't: encoding a full URL with component-level encoding turns :// and ? into data, breaking the link. Encode each parameter value separately, then assemble the URL.

Text

Uppercase / Lowercase · Word Counter · Character Counter · Lorem Ipsum Generator · Remove Extra Spaces · Sort Text Lines