Encode special characters for safe use in URLs and query strings, or decode percent-encoded strings back to readable text. Runs entirely in your browser.
| Character | Encoded | Description |
|---|---|---|
| (space) | %20 | Space character |
| ! | %21 | Exclamation mark |
| # | %23 | Hash / fragment |
| $ | %24 | Dollar sign |
| & | %26 | Ampersand |
| ' | %27 | Apostrophe |
| + | %2B | Plus sign |
| / | %2F | Forward slash |
| = | %3D | Equals sign |
| ? | %3F | Question mark |
| @ | %40 | At sign |
Developer tools are just the start. OneStepToRank monitors your Google rankings 24/7 across your entire service area and automatically adapts your strategy to keep you on top.
Get Started FreeURL encoding, formally known as percent-encoding, is the process of converting characters that are not allowed or have special meaning in a URL into a safe representation using a percent sign followed by two hexadecimal digits. This mechanism is defined by RFC 3986 (Uniform Resource Identifier) and ensures that URLs are transmitted correctly across the internet. For example, a space character is encoded as %20, an ampersand becomes %26, and a question mark becomes %3F. Without URL encoding, browsers and servers would misinterpret these characters as structural URL components rather than literal data.
RFC 3986 defines two categories of characters in URLs. Unreserved characters -- letters (A-Z, a-z), digits (0-9), hyphen, underscore, period, and tilde -- can appear in a URL without encoding. Reserved characters such as : / ? # [ ] @ ! $ & ' ( ) * + , ; = have special structural meaning in URI syntax. When these reserved characters need to appear as literal data within a URL component (such as a query parameter value), they must be percent-encoded. The encoding process converts each byte of the character's UTF-8 representation into a %HH format, where HH is the hexadecimal value of the byte. Multi-byte UTF-8 characters like accented letters or emoji produce multiple percent-encoded triplets.
Every major programming language provides built-in functions for URL encoding. In JavaScript, encodeURIComponent() encodes a string for use as a URI component, while encodeURI() encodes a full URI while preserving structural characters. Python offers urllib.parse.quote() and urllib.parse.urlencode(). PHP has urlencode() and rawurlencode(). Understanding when and how to apply URL encoding is critical for building secure web applications -- improper encoding is a common source of bugs and can lead to injection vulnerabilities when user input is placed directly into URLs without sanitization.