Live URL-encode and decode text, parse URLs and look up special characters.
| 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 }} |
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.
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.
encodeURIComponent() for individual parameter values, encodeURI() for full URLs.%2520 instead of %20) are a common mistake — encode only once.