Cloudesk

URL Encoder/Decoder

Encode and decode URLs using Full URL (encodeURI) or URL Component (encodeURIComponent) modes

When to Use Each Mode

  • Use "URL Component" (encodeURIComponent) when encoding a single query parameter value, e.g. the search term in ?q=hello+world.
  • Use "Full URL" (encodeURI) when encoding an entire URL — it preserves structural characters like /, ?, #, and : that are part of the URL syntax.
  • In Decode mode, choose the same type that was used to encode. Mixing types may produce incorrect results.
  • Both functions leave unreserved characters (A–Z, a–z, 0–9, -, _, ., ~) untouched.

Percent-Encoding (RFC 3986)

What Is Percent-Encoding?

Percent-encoding (also called URL encoding) replaces unsafe or reserved characters with a % sign followed by two hexadecimal digits representing the byte value in UTF-8. For example, a space becomes %20 and © becomes %C2%A9.

RFC 3986 Reserved Characters

These characters have special meaning in a URI and must be percent-encoded when used as data (not as delimiters). encodeURIComponent() encodes all of them; encodeURI() preserves most of them.

:/?#[]@!$&'()*+,;=

encodeURI vs encodeURIComponent

encodeURI() is designed for a complete URL and does not encode characters that are valid URI syntax (e.g. / : ? # @ ! $ & ' ( ) * + , ; =). encodeURIComponent() encodes everything except unreserved characters, making it safe for embedding values inside query strings or path segments.

How to Use the URL Encoder/Decoder

  1. 1Select Encode or Decode mode using the toggle at the top.
  2. 2Choose the encoding type: "URL Component" for query parameter values or "Full URL" for entire addresses.
  3. 3Type or paste your input — the result is computed instantly.
  4. 4Click Copy to copy the output to your clipboard, or Clear to reset the input.

Related Tools