ASCII to Integer Converter
Convert ASCII characters to integer values instantly. Get decimal, hexadecimal, octal, and binary representations for any text input.
About
Every character transmitted over a network or stored in memory maps to a numeric code point defined by the ASCII standard (ANSI X3.4-1986) or its Unicode superset. Misinterpreting these mappings causes encoding corruption, broken file parsing, and protocol failures. This tool converts each input character to its integer representation across four bases: decimal (d), hexadecimal (h), octal (o), and binary (b). It handles the full standard ASCII range 0 - 127 and extended Unicode code points up to 65535 (BMP). Note: surrogate pairs for code points above U+FFFF are reported as two separate 16-bit values, not as a single scalar.
Formulas
The conversion from a character to its integer code point is a direct lookup operation defined by the encoding standard. For any character c in a string S at position i, the decimal integer value is:
Base conversions from the decimal value d follow standard positional notation. For hexadecimal (base 16):
For octal (base 8):
For binary (base 2):
Binary output is zero-padded to the nearest byte boundary (8, 16, or 32 bits) to reflect actual memory representation. The padding width w is calculated as:
Where d = decimal code point, h = hexadecimal string, o = octal string, b = binary string, w = padding width in bits, S = input string, i = character index.
Reference Data
| Character | Name | Decimal | Hex | Octal | Binary | Category |
|---|---|---|---|---|---|---|
| NUL | Null | 0 | 0x00 | 000 | 00000000 | Control |
| TAB | Horizontal Tab | 9 | 0x09 | 011 | 00001001 | Control |
| LF | Line Feed | 10 | 0x0A | 012 | 00001010 | Control |
| CR | Carriage Return | 13 | 0x0D | 015 | 00001101 | Control |
| SP | Space | 32 | 0x20 | 040 | 00100000 | Whitespace |
| ! | Exclamation Mark | 33 | 0x21 | 041 | 00100001 | Punctuation |
| 0 | Digit Zero | 48 | 0x30 | 060 | 00110000 | Digit |
| 9 | Digit Nine | 57 | 0x39 | 071 | 00111001 | Digit |
| A | Latin Capital A | 65 | 0x41 | 101 | 01000001 | Uppercase |
| Z | Latin Capital Z | 90 | 0x5A | 132 | 01011010 | Uppercase |
| a | Latin Small A | 97 | 0x61 | 141 | 01100001 | Lowercase |
| z | Latin Small Z | 122 | 0x7A | 172 | 01111010 | Lowercase |
| { | Left Curly Bracket | 123 | 0x7B | 173 | 01111011 | Punctuation |
| } | Right Curly Bracket | 125 | 0x7D | 175 | 01111101 | Punctuation |
| ~ | Tilde | 126 | 0x7E | 176 | 01111110 | Punctuation |
| DEL | Delete | 127 | 0x7F | 177 | 01111111 | Control |
| ยฉ | Copyright Sign | 169 | 0xA9 | 251 | 10101001 | Symbol |
| ยฃ | Pound Sign | 163 | 0xA3 | 243 | 10100011 | Currency |
| โฌ | Euro Sign | 8364 | 0x20AC | 20254 | 0010000010101100 | Currency |
| ฯ | Greek Small Pi | 960 | 0x03C0 | 1700 | 0000001111000000 | Greek |
| @ | Commercial At | 64 | 0x40 | 100 | 01000000 | Punctuation |
| # | Number Sign | 35 | 0x23 | 043 | 00100011 | Punctuation |
| \ | Reverse Solidus | 92 | 0x5C | 134 | 01011100 | Punctuation |
| / | Solidus | 47 | 0x2F | 057 | 00101111 | Punctuation |
| & | Ampersand | 38 | 0x26 | 046 | 00100110 | Punctuation |
| = | Equals Sign | 61 | 0x3D | 075 | 00111101 | Punctuation |