URL Encoder / Decoder

Encode and decode URLs instantly in your browser.

Why URL encoding is needed

URLs often contain characters that are not valid in certain contexts, such as spaces or special symbols. Encoding ensures URLs are safely transmitted and interpreted by web servers and browsers.

How to encode a URL

To encode a URL, use the encodeURIComponent function in JavaScript. This replaces unsafe characters with their encoded equivalents.

How to decode URL parameters

Decoding reverses the encoding process, converting encoded characters back to their original form using decodeURIComponent.

Examples of encoded URLs

  • Space: %20
  • Exclamation mark: %21
  • At symbol: %40
  • Hash: %23