UnitConv
URL Encode

URL Encoder / Decoder

Percent-encode and decode text for safe use in URLs

About this tool

This URL encoder converts text into percent-encoded form so it can be placed safely inside a web address, and decodes %XX sequences back to readable text. URLs may only contain a limited set of characters, so spaces, ampersands, slashes, and non-ASCII letters must be escaped before they go into a query string or path. Component mode (encodeURIComponent) escapes reserved characters like & = ? / and is what you want for a single parameter value; Full URL mode (encodeURI) leaves the structural characters intact so a complete address stays usable.

How to use

  1. 1 Choose Encode to make text URL-safe, or Decode to reverse it.
  2. 2 Pick Component for one parameter value, or Full URL for a whole address.
  3. 3 Type or paste your text into the input box.
  4. 4 Copy the percent-encoded (or decoded) result, or Swap to flip the direction.

How it works

Percent-encoding replaces an unsafe character with a percent sign followed by its byte value in hexadecimal. A space becomes %20, an ampersand becomes %26, and a slash becomes %2F. Characters outside ASCII are first encoded as UTF-8, then each byte is written as %XX, so a single non-Latin character can expand into several percent groups. Component mode escapes the reserved delimiters & = ? / # so a value cannot break the surrounding query string, which is why encodeURIComponent("a b&c") gives a%20b%26c. Full-URL mode preserves those delimiters so an entire address remains structurally valid.

Frequently asked questions

What is URL (percent) encoding?

It is a scheme that replaces characters not allowed in a URL with a % sign and the character's hexadecimal byte value, so any text can be carried safely in an address.

Component or full-URL mode — which should I use?

Use Component for a single value such as a query parameter; it escapes & = ? /. Use Full URL when encoding a whole address so the structural characters stay intact.

Why does a space become %20?

Spaces are not allowed in URLs, so they are replaced by their byte value 0x20 written as %20. In query strings a + sign is sometimes used instead.

How are emoji and accented letters handled?

They are encoded as UTF-8 bytes first, then each byte becomes a %XX group, so one character may turn into several percent sequences and still decode back exactly.

Related tools and uses

For encoding binary payloads use the Base64 encoder. To look up the byte values behind each percent group see the ASCII / Unicode converter, and the number base converter helps read those values in hex.