The URL Encoder / Decoder converts special characters to percent-encoded sequences (%xx) or decodes percent-encoded sequences back to readable text. It is an essential utility when working with query strings, form data, API parameters, redirect URLs, and URL path segments.
Characters with special meaning in URL syntax — spaces, &, =, +, ?, #, and all non-ASCII characters — must be percent-encoded to be transmitted safely. Without encoding, these characters break the URL structure and cause query parameters to be parsed incorrectly. This tool handles both modes: Full URL encoding (preserves structural characters like /, ?, &, and = so the URL remains navigable) and Component encoding (encodes everything including structural characters, suitable for individual parameter values).
A common workflow: when building a URL like https://example.com/search?q=hello world&tag=c#, the query value 'hello world' and the hash fragment must be component-encoded before being inserted, while the base URL structure is preserved with full URL encoding.
The encoder/decoder also correctly handles Unicode and non-ASCII characters, converting them to their UTF-8 byte sequences before percent-encoding — the correct approach per RFC 3986.
Everything runs entirely in your browser. Your URLs and data are never sent to a server.
Paste your URL or text string.
Select Encode or Decode.
Choose Full URL mode (preserves /, ?, &, =) or Component mode (encodes everything).
Copy the result.
These two JavaScript functions (and this tool's Full URL vs Component modes) serve different purposes. encodeURI is meant for encoding a complete URL you already have — it leaves structural characters like /, ?, and & alone so the URL keeps working, and only encodes things like spaces and unsafe characters.
encodeURIComponent is meant for encoding a single value that will be inserted into a URL, such as a query parameter — it encodes everything, including /, ?, and &, since those characters would otherwise break the URL structure if they appeared inside a value. Using the wrong one is a common source of broken links and mis-parsed query strings.
encodeURI encodes a full URL, preserving structural characters like /, ?, &, and =. encodeURIComponent encodes individual parameter values, also encoding those structural characters.
%20 is the standard percent-encoding for a space in URLs. The + encoding for spaces is specific to HTML form data (application/x-www-form-urlencoded) and should not be used in URL paths.
Any character outside the unreserved set (letters, digits, -, _, ., ~) gets encoded. In component mode, structural URL characters (/, ?, &, =, #, :) are also encoded.
Yes — the decoder handles any number of %xx sequences in a single pass, including sequences like %20, %2F, %3D, %26, etc.
Use Component mode (encodeURIComponent equivalent) to encode the value. This encodes characters like &, =, and + that would otherwise break the query string structure.
This usually happens when Full URL mode is used on a value that should have been Component-encoded, or vice versa. If you're encoding a complete URL, use Full URL mode; if you're encoding one parameter value, use Component mode.
Yes — component-encode the subject and body text separately, then build the link as mailto:[email protected]?subject=ENCODED_SUBJECT&body=ENCODED_BODY.
Yes — non-ASCII characters are converted to their UTF-8 byte sequence and then percent-encoded, which is the correct approach per RFC 3986 and how modern browsers handle internationalized URLs.