Free tool

Free Online URL Encoder & Decoder

This free online URL encoder and decoder processes special characters with encodeURIComponent or encodeURI. Essential for safe URL construction in web APIs, query strings and HTTP request headers. You choose the mode: encodeURIComponent for parameters, encodeURI for full URLs. 100% client-side, 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 (MACM)

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 difference counter shows how many more (or fewer) characters the result has than the input.

  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 +?

RFC 3986 (URLs) uses %20 for spaces, and this tool encodes them that way. The + only represents spaces in the application/x-www-form-urlencoded format of HTML forms, so when decoding in Component mode the + becomes a space by default. Uncheck 'Treat + as space (form data)' to keep it.

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.

Related tools

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?locale=en"
  width="100%"
  height="600"
  frameborder="0"
  title="URL Encoder Decoder"
></iframe>
View embed in new tab →