Utility
URL encoder / decoder
Encode and decode text for use in URLs. Converts special characters to the %XX standard used by modern browsers.
Result
The result will appear here.
Key concepts
URL encoding (also called percent-encoding) converts characters that are unsafe to use in a URL into an escape sequence of the form
%XX, where XX is the hexadecimal value of the character. For example, a space becomes %20 and an at-sign becomes %40. This ensures the URL is valid across all browsers and servers.
Whenever you embed free text in a URL: GET parameters with special characters or spaces (e.g.
?q=café latte), hash fragments, or any user-supplied data in the query string. Without encoding, the server may interpret reserved characters (&, =, #) as structural URL elements rather than data.
encodeURI encodes a full URL and leaves structural reserved characters untouched (:, /, ?, &, #). encodeURIComponent encodes everything, including those characters, because it assumes you are encoding a parameter value rather than a full URL. This tool uses encodeURIComponent, which is the correct standard for encoding individual values.
There are two conventions: RFC 3986 uses
%20 for spaces, while the application/x-www-form-urlencoded format (HTML forms) uses +. Modern browsers and encodeURIComponent follow RFC 3986 and produce %20, which is correct for any URL. The + sign should only be used in HTML form bodies, not in general URLs.