ASCII URL Encoder
Encode and decode URLs using RFC 3986 percent-encoding. Convert special characters to ASCII URL-safe format instantly.
About
URLs transmitted over HTTP must conform to RFC 3986, which restricts the allowed character set to 66 unreserved characters: A - Z, a - z, 0 - 9, and the symbols - _ . ~. Every other character - including spaces, non-ASCII glyphs, and reserved delimiters like & or = - must be percent-encoded as %HH, where HH is the uppercase hexadecimal value of the character's UTF-8 byte. Failing to encode query parameters correctly causes broken links, corrupted form submissions, injection vulnerabilities, and silent data loss in analytics pipelines. This tool performs real RFC 3986 percent-encoding on arbitrary input, including multi-byte UTF-8 sequences, and provides three encoding strictness modes.
Limitation: this tool approximates browser-native encodeURIComponent behavior for Component mode. Full URL mode preserves structural delimiters (: / ? # & = @) and encodes everything else. Encode All mode encodes every character including unreserved ones. Pro tip: always encode individual parameter values, never the entire URL string, or you will double-encode the delimiters.
Formulas
RFC 3986 defines the percent-encoding transformation. For each character c in the input string, the encoder determines whether c belongs to the unreserved set. If not, it converts c to its UTF-8 byte sequence and emits each byte as a percent-encoded triplet.
encode(c) =
Where U is the unreserved character set defined as:
For multi-byte characters (code point > 127), the character is first encoded into its UTF-8 byte representation. A character with code point U produces 1 to 4 bytes depending on the range:
Where c = input character, U = unreserved set, bi = i-th byte of UTF-8 encoding, hex = uppercase hexadecimal conversion function.
Reference Data
| Dec | Hex | Char | Encoded | Category | Description |
|---|---|---|---|---|---|
| 0 | 00 | NUL | %00 | Control | Null character |
| 9 | 09 | TAB | %09 | Control | Horizontal tab |
| 10 | 0A | LF | %0A | Control | Line feed (newline) |
| 13 | 0D | CR | %0D | Control | Carriage return |
| 32 | 20 | SP | %20 | Reserved | Space (also + in forms) |
| 33 | 21 | ! | %21 | Sub-delimiter | Exclamation mark |
| 34 | 22 | " | %22 | Unsafe | Double quote |
| 35 | 23 | # | %23 | Reserved (gen-delim) | Fragment identifier |
| 36 | 24 | $ | %24 | Sub-delimiter | Dollar sign |
| 37 | 25 | % | %25 | Reserved (encoding) | Percent sign (escape char itself) |
| 38 | 26 | & | %26 | Reserved (gen-delim) | Ampersand (query separator) |
| 39 | 27 | ' | %27 | Sub-delimiter | Single quote / apostrophe |
| 40 | 28 | ( | %28 | Sub-delimiter | Opening parenthesis |
| 41 | 29 | ) | %29 | Sub-delimiter | Closing parenthesis |
| 42 | 2A | * | %2A | Sub-delimiter | Asterisk |
| 43 | 2B | + | %2B | Sub-delimiter | Plus sign (space in forms) |
| 44 | 2C | , | %2C | Sub-delimiter | Comma |
| 47 | 2F | / | %2F | Reserved (gen-delim) | Forward slash (path separator) |
| 58 | 3A | : | %3A | Reserved (gen-delim) | Colon (scheme separator) |
| 59 | 3B | ; | %3B | Sub-delimiter | Semicolon |
| 60 | 3C | < | %3C | Unsafe | Less-than sign |
| 61 | 3D | = | %3D | Reserved (gen-delim) | Equals sign (key-value separator) |
| 62 | 3E | > | %3E | Unsafe | Greater-than sign |
| 63 | 3F | ? | %3F | Reserved (gen-delim) | Question mark (query start) |
| 64 | 40 | @ | %40 | Reserved (gen-delim) | At sign (userinfo separator) |
| 91 | 5B | [ | %5B | Reserved (gen-delim) | Opening bracket (IPv6) |
| 93 | 5D | ] | %5D | Reserved (gen-delim) | Closing bracket (IPv6) |
| 123 | 7B | { | %7B | Unsafe | Opening brace |
| 124 | 7C | | | %7C | Unsafe | Pipe / vertical bar |
| 125 | 7D | } | %7D | Unsafe | Closing brace |
| 126 | 7E | ~ | ~ | Unreserved | Tilde (not encoded) |
| 127 | 7F | DEL | %7F | Control | Delete character |