Full 0-255 decimal, hex, binary, and character mapping
ASCII — the American Standard Code for Information Interchange — is the foundation of how computers represent text. Published in 1963 and revised in 1986 (ANSI X3.4-1986), ASCII assigns a unique 7-bit number to 128 characters: uppercase and lowercase English letters, digits 0-9, common punctuation, and 33 non-printable control codes. Every time you press a key, your computer looks up the corresponding ASCII value — and that value, stored in binary, is what gets processed, transmitted, and saved to disk.
This table spans the full 0-255 range — the original 7-bit ASCII (0-127) plus the extended 8-bit ASCII set (128-255) that covers accented letters, math symbols, and box-drawing characters used in older DOS and terminal applications. Whether you are debugging a serial protocol, writing a text parser, studying character encoding for a CS class, or decoding a CTF puzzle, this is the reference you will keep coming back to.
Each row maps one character to four representations:
Two tricks every developer should know:
Case conversion is a single bit flip. Uppercase 'A' is decimal 65 (binary 01000001). Lowercase 'a' is decimal 97 (binary 01100001). The only difference is bit 5 (counting from 0 on the right): set it to 1 for lowercase, 0 for uppercase. This 32-value gap applies to every letter A-Z — that is why c ^ 32 toggles case in C.
Digit-as-value is just subtraction. The characters '0' through '9' occupy decimal 48 through 57. To get the actual numeric value of a digit character, subtract 48. This is why c - '0' works in C, Java, JavaScript, and virtually every language that inherits from the ASCII standard.
The first 32 ASCII codes are control characters — they do not print anything visible but issue commands to terminals, printers, and communication hardware. Many date back to 1960s teletype machines, yet they still appear in modern protocols, file formats, and terminal emulators:
ESC[31m turns text red).When you spot these codes in a hex dump or raw binary file, knowing what they mean immediately tells you whether you are looking at a text file with line breaks, a serial data stream with acknowledgment markers, or a binary blob with NUL padding between fields.
| Dec | Hex | Binary | Character |
|---|
These are the ASCII values developers, students, and puzzle solvers look up most often:
Standard ASCII only uses 7 bits (0-127), but modern computers work with 8-bit bytes. The range from 128 to 255 — often called "extended ASCII" — is not part of the original ASCII specification. Different systems and code pages map these codes to different characters:
In practice, ASCII values 128-255 are rarely used in modern web development because UTF-8 has replaced code-page-specific encodings. However, you will still encounter them in legacy systems, embedded firmware, and older file formats. If you see a character that looks wrong in this range, the file was likely written with a different code page than the one your system expects.
UTF-8 is the dominant character encoding on the web today — and it was designed to be backward compatible with ASCII. Every ASCII character (0-127) has the exact same byte value in UTF-8. This means any valid ASCII text is automatically valid UTF-8. The innovation of UTF-8 is in how it handles characters beyond 127: instead of using a single byte per character like extended ASCII code pages do, UTF-8 uses multi-byte sequences (2-4 bytes) to encode over a million characters across all the world's writing systems, emoji, and specialized symbols.
The practical takeaway: if you are working with plain English text, ASCII and UTF-8 are identical. But if your binary translator starts outputting � (the Unicode replacement character) for bytes above 127, you are trying to decode multi-byte UTF-8 data as single-byte ASCII — split it into the correct byte sequences first.