Free tool

Free Online URL Encoder & Decoder

Encode and decode URLs with encodeURIComponent or encodeURI. Automatic special character detection. No sign-up.

0 chars
0 chars

encodeURIComponent encodes all special characters (including : / ? # [ ] @ ! $ & ' ( ) * + , ; =). Best for parameter values.

encodeURI preserves the full URL structure (does not encode : / ? # etc.). Best for complete URLs.

Built by

Miguel Ángel Colorado Marin

Full-Stack Developer · Guadalajara, España

I develop web apps, digital tools and full projects — from design to deployment.

Contact me

How to use the URL encoder?

  1. 1

    Choose your mode

    Select Encode to convert a URL with special characters to its percent-encoded form, or Decode to get the original readable URL from an encoded URL.

  2. 2

    Choose the encoding type

    encodeURIComponent encodes all special characters including : / ? # & = and is ideal for encoding parameter values. encodeURI preserves the full URL structure and only encodes characters that can never appear in a URL.

  3. 3

    Paste your URL

    Enter the URL in the left panel. The result appears in real time in the right panel. The character difference counter shows how many characters changed during encoding.

  4. 4

    Copy or swap

    Use the Copy button to take the result to your clipboard. The ⇄ button swaps input and output and changes mode automatically. The Sample button loads an example URL with Spanish special characters.

Frequently asked questions

What is percent-encoding?

Percent-encoding (or URL encoding) is the mechanism that converts characters not allowed in a URL into their hexadecimal representation preceded by %. For example, a space becomes %20, ñ becomes %C3%B1, and the € symbol becomes %E2%82%AC.

What is the difference between encodeURIComponent and encodeURI?

encodeURI is designed to encode a complete URL and preserves the reserved characters that form the URL structure (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), making it ideal for encoding query string parameter values.

When should I use the URL encoder?

When you dynamically build URLs in JavaScript before including them in a fetch or XMLHttpRequest, when you form query strings with values that may contain special characters, or when you need to decode an encoded URL to read it in human-readable form.

Why is space encoded as %20 and not as +?

The RFC 3986 standard (URLs) uses %20 for spaces. The + symbol is used for spaces only in the application/x-www-form-urlencoded format (HTML forms). This tool follows the RFC 3986 standard.

Is my data sent to any server?

No. All encoding and decoding is done in your browser using the native encodeURIComponent, encodeURI, decodeURIComponent and decodeURI functions. No data is sent to any server.

Embed the encoder on your site

Embed this URL encoder in any web page with a simple iframe:

<iframe
  src="https://miguelacm.es/embed/url-encoder"
  width="100%"
  height="600"
  frameborder="0"
  title="URL Encoder Decoder"
></iframe>
View embed in new tab →