Text to ASCII codes in five formats
Every character has a numeric code. The text to ASCII converter lists those codes for each character in your text, which is useful for programming exercises, protocol work, debugging hidden characters and building lookup tables.
Example
Input: Hello ASCII!
| Code format | Output |
|---|---|
| Decimal | 72 101 108 108 111 32 65 83 67 73 73 33 |
| Hex | 0x48 0x69 0x21 (for “Hi!”) |
| Octal | 0110 0151 041 (for “Hi!”) |
| Binary | 01001000 01101001 00100001 (for “Hi!”) |
| HTML | H i ! (for “Hi!”) |
Octal values use a leading 0 and hex values a 0x prefix, the conventions of C-family languages. Separators can be spaces, commas or new lines.
ASCII and Unicode
ASCII defines codes 0 to 127: control characters (0–31 and 127), the space (32), punctuation, digits (48–57), uppercase letters (65–90) and lowercase letters (97–122). Characters outside that range are not ASCII, so the tool outputs their Unicode code point instead. For example, “é” and “€” give 233, 8364. For ASCII characters the code point and the ASCII code are identical, so the output is always consistent.
Note that this is the code point, not the UTF-8 bytes. If you need the bytes, use String to Byte Array or String to Hex.
Hexadecimal is the most common notation in programming documentation and Unicode charts, decimal is used by HTML references and most ASCII tables, octal appears in older C code and Unix tools, and binary is mainly used for teaching and bit-level work.
Control characters you may see
| Code | Name | Meaning |
|---|---|---|
| 0 | NUL | Null — string terminator in C |
| 9 | TAB | Horizontal tab |
| 10 | LF | Line feed — Unix line ending |
| 13 | CR | Carriage return — part of Windows CRLF; the editor stores CRLF as one line feed, so it is not output |
| 27 | ESC | Escape — starts terminal colour codes |
| 127 | DEL | Delete |
Handy ASCII facts
- Uppercase and lowercase letters differ by exactly 32 (A = 65, a = 97), which is why flipping bit 5 changes case.
- The digit characters
0–9are codes 48–57, so subtracting 48 converts a digit character to its value. - Line feed is 10 and tab 9; seeing them in the output helps locate stray line breaks and tabs. Carriage return (13) does not appear, because the editor stores every line break as a line feed.
Convert codes back with ASCII to Text. The conversion runs in your browser.