URL Encoder / Decoder
Encode and decode URLs and query parameters — edit either side and the other updates in real time
Encoded characters highlighted
Encode URL query parameters
URL Encoder / Decoder — Tips & Guide
URL encoding converts characters that are not allowed or have special meaning in URLs into a percent-encoded format (%XX). This ensures URLs are valid and unambiguous across all browsers and servers.
Use encodeURIComponent for Params
encodeURIComponent() encodes everything except letters, digits, and - _ . ! ~ * ' ( ). Always use it for individual query parameter values to avoid breaking the URL structure.
Use encodeURI for Full URLs
encodeURI() encodes a full URL while preserving the characters that have structural meaning (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). Use it when encoding a complete URL, not individual components.
Always Encode User Input
When appending user-provided data to a URL, always encode it with encodeURIComponent(). Failing to do so can break URLs or introduce open redirect and injection vulnerabilities in your application.
URL encoding (also known as percent-encoding) converts characters that are not allowed or carry special meaning in a URL into a % followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20. This ensures URLs remain valid and unambiguous when transmitted over the internet.
%20 is the percent-encoded representation of a space character (ASCII code 32, or hex 0x20). Because a literal space is not a valid character inside a URL, it must be encoded as %20 or, in form submissions, as a + sign. You'll frequently see it in search query URLs such as ?q=hello%20world.
Paste the URL-encoded string into the right-hand "URL-Encoded" column and the decoded version will appear instantly on the left in the "Raw Text" column. The tool uses JavaScript's built-in decodeURIComponent() function. You can also decode URLs programmatically with decodeURI() for full URLs or decodeURIComponent() for individual components.
Any character outside the "unreserved" set must be percent-encoded. Unreserved characters (safe without encoding) are: letters (A–Z, a–z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~). Characters with special URL meaning—like & = ? # / :—must be encoded when used as data values in query parameters.