Mini Tools

URL Encode & Decode Online

Encode/Decode full URLs or components. Parse query strings to a table. All in your browser.

Output

        

What is URL encoding?

URL encoding, or percent-encoding, replaces characters that are unsafe or reserved in a URL with % followed by their byte value in hex. Non-ASCII characters are first converted to UTFโ€‘8 bytes, then each byte is encoded.

CharacterEncodedWhy
space%20Not allowed in URLs (+ in HTML form data)
&%26Separates query parameters
=%3DSeparates key and value
?%3FStarts the query string
#%23Starts the fragment
/%2FPath separator
รฉ%C3%A9Non-ASCII (2 UTFโ€‘8 bytes)
๐Ÿ˜€%F0%9F%98%80Emoji (4 UTFโ€‘8 bytes)

Encode vs Encode Component

  • Encode (encodeURI) is for a whole URL. It keeps characters with structural meaning โ€” : / ? # & = + @ ; , $ โ€” and escapes spaces and non-ASCII characters.
  • Encode Component (encodeURIComponent) is for a single value such as a query parameter or path segment. It escapes everything except Aโ€“Z aโ€“z 0โ€“9 - _ . ! ~ * ' ( ).

Rule of thumb: build URLs by encoding each parameter value with Encode Component. Encoding a full URL with it would also escape :// and break the link.

How to use this URL tool

  • Paste a URL or text and choose Encode, Decode, Encode Component or Decode Component.
  • For full URLs, the tool shows a breakdown of protocol, host, port, path, hash and a table of query parameters.
  • Copy the result with one click.

Frequently asked questions

When should I URL-encode?

Whenever you put user input or arbitrary text into a URL โ€” query values, path segments or redirect targets โ€” encode it with encodeURIComponent.

Should a space be %20 or +?

In URL paths a space must be %20. In application/x-www-form-urlencoded query strings (HTML forms), + is also accepted as a space. %20 is always safe.

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves URL delimiters like / ? & = # intact and is meant for complete URLs. encodeURIComponent escapes them and is meant for individual values.

Why do I get "URI malformed" when decoding?

The input contains a % that is not followed by two hex digits, or an invalid UTF-8 byte sequence. Check for stray % characters.

What is URL-safe Base64?

A Base64 variant that uses - and _ instead of + and / and usually omits = padding, so it can be placed in URLs without percent-encoding.

Is parsing done locally?

Yes. All encoding, decoding and URL parsing happens in your browser.