Encode and decode URLs instantly using percent-encoding. Parse any URL into its components, build query strings from key-value pairs, detect double encoding, and bulk process multiple lines -- all client-side in your browser.
Convert text to percent-encoded format using encodeURIComponent or encodeURI. Decode any percent-encoded string back to readable text. Handles Unicode, special characters, and reserved URL characters.
Paste any URL and instantly see it broken down into protocol, host, port, path, query parameters, and fragment. Each component is displayed separately with one-click copy buttons.
Build query strings visually by adding key-value pairs. Values are automatically encoded with encodeURIComponent. Copy the result and append it to any URL.
Automatically detects when input or output contains double-encoded patterns (like %2520 instead of %20) and warns you before they cause hard-to-debug issues in your application.
URL encoding, also known as percent-encoding, is defined in RFC 3986 as the mechanism for encoding characters in a Uniform Resource Identifier (URI) that are not allowed or have special meaning. When a character needs to be encoded, it is replaced with a percent sign (%) followed by two hexadecimal digits representing the character's byte value in UTF-8.
URLs can only contain a limited set of characters from the ASCII character set. Characters outside this set -- including spaces, non-ASCII characters like accented letters, and reserved characters used outside their intended purpose -- must be percent-encoded to be included in a URL. Incorrect encoding is one of the most common causes of broken links, failed API calls, and security vulnerabilities like open redirect attacks.
JavaScript provides two built-in functions for URL encoding:
- _ . ~ ! * ' ( ). Use this for encoding individual query parameter keys and values.: / ? # [ ] @ ! $ & ' ( ) * + , ; =. Use this when you want to encode a full URL without breaking its structure.Character Encoded Space %20 (or + in form data) ! %21 # %23 $ %24 & %26 ' %27 + %2B / %2F = %3D @ %40
In the Encode / Decode tab, paste text or a URL and click Encode or Decode. Check the "Use encodeURI" box to preserve URL structure characters. For multiple strings, enter one per line for bulk processing. The URL Parser tab breaks any URL into its protocol, host, port, path, query parameters, and hash. The Query Builder tab lets you add key-value pairs to construct a properly-encoded query string.
encodeURI is designed to encode a complete URI and therefore preserves characters that have special meaning in URLs, including colons (:), forward slashes (/), question marks (?), hash signs (#), ampersands (&), and equals signs (=). encodeURIComponent encodes all characters except unreserved characters (letters, digits, hyphens, underscores, periods, tildes, and a few others), making it suitable for encoding individual components like query parameter values. In practice, use encodeURIComponent when encoding parameter values, and encodeURI when you have a full URL with unencoded non-ASCII characters but valid structure.
: / ? # [ ] @ ! $ & ' ( ) * + , ; =. The percent sign (%) itself must be encoded as %25 when used literally. Unreserved characters that never need encoding are: uppercase and lowercase letters (A-Z, a-z), digits (0-9), hyphen (-), period (.), underscore (_), and tilde (~).
encodeURIComponent produces %20, while URLSearchParams produces + for form-compatible encoding.
encodeURIComponent, decodeURIComponent, and URL APIs. No data is sent to any server, no data is stored, and no data is logged. Your URLs and text never leave your browser. You can verify this by checking the network tab in your browser's developer tools -- there are no API calls made when you use this tool.
Check out our other free developer tools. Format JSON, decode JWTs, parse cron expressions, and more -- all from your browser with no sign-up required.
JSON Formatter →