URL Encoder/Decoder

Live URL-encode and decode text, parse URLs and look up special characters.

{{ errorMsg }}
Protocol{{ parsedUrl.protocol }}
Host{{ parsedUrl.host }}
Port{{ parsedUrl.port }}
Path{{ parsedUrl.pathname }}
Hash / Fragment{{ parsedUrl.hash }}
Parameter Value
{{ p.key }} {{ p.value }}
Character Encoded Category Description
{{ r.char }} {{ r.encoded }} {{ r.category }} {{ r.desc }}

What Is URL Encoding?

URL encoding (also called percent encoding) converts special characters into a format that can be safely transmitted in URLs. Each disallowed character is replaced by a percent sign (%) followed by two hexadecimal digits, e.g., a space becomes %20. This is defined in RFC 3986 and ensures that URLs can be universally interpreted.

When Is URL Encoding Needed?

URL encoding is necessary whenever special characters, spaces, or non-ASCII characters appear in a URL parameter, path, or fragment. Browsers often encode URLs automatically, but when manually building API calls, redirect URLs, or tracking links, encoding must be done explicitly.

URL Encoding Tips

  • Use encodeURIComponent() for individual parameter values, encodeURI() for full URLs.
  • Double-encoded URLs (e.g. %2520 instead of %20) are a common mistake — encode only once.
  • Non-ASCII characters (e.g., umlauts, CJK characters) are encoded as UTF-8 bytes, resulting in longer sequences.