shopcie

Ascii Binary Table

ASCII assigns a number from 0 to 127 to each letter, digit, punctuation mark and control code, and those numbers are what computers store in binary. This table lists all 128 codes with their decimal, hex, octal and 8-bit binary values, explains the control characters, and lets you type any text to see its codes — with printable charts in the pack.

Searchable ASCII table

ASCII Reference Pack

Printable ASCII reference chart (decimal, hex, binary, character), control character guide, binary alphabet sheet and an encoding worksheet with answer key.

Formats: PDF, XLSX, DOCX. Instant download after payment (link valid 72 hours, up to 5 downloads). AI-assisted: the templates were drafted with AI help and reviewed and laid out by Kedop.

$5.00 USD, one-time

Secure card checkout by Stripe. Full refund within 7 days — see the refund policy and license.

How the ASCII table is organised

RangeContentsBinary pattern
0–31Control characters (tab, line feed, carriage return, escape…)000xxxxx
32Space0010 0000
33–47Punctuation and symbols (! " # $ % & …)0010xxxx
48–57Digits 0–90011 0000 to 0011 1001
58–64More punctuation (: ; < = > ? @)
65–90Uppercase A–Z010xxxxx
91–96Brackets and symbols ([ \ ] ^ _ `)
97–122Lowercase a–z011xxxxx
123–126Braces and symbols ({ | } ~)
127DEL (delete)0111 1111

The layout has useful patterns. A digit’s code is 48 plus its value, so the low four bits of ‘7’ (0011 0111) are 0111 = 7. Uppercase and lowercase letters differ only in one bit (value 32): A is 0100 0001 and a is 0110 0001, which is why flipping bit 5 changes case.

Control characters you still meet

DecNameWhere you see it
9HT — tabTab-separated data, indentation
10LF — line feedNew line on Linux and macOS, and in most files and protocols
13CR — carriage returnWindows line endings are CR LF (13 10)
0NULString terminator in C
27ESCTerminal colour and cursor codes
7BELTerminal beep
8BSBackspace
127DELDelete; historically punched all holes on paper tape

Most other control codes come from teleprinters and early data links and are rarely used directly today, though some still appear in serial communications and file formats.

ASCII, extended ASCII and Unicode

ASCII defines only 128 characters, which fit in 7 bits; stored in a byte, the top bit is 0. “Extended ASCII” is a loose name for various 8-bit code pages that used codes 128–255 for accented letters and symbols — ISO 8859-1 (Latin-1) and Windows-1252 are common examples, and they differ in places. Unicode now covers every writing system, and its most common encoding, UTF-8, keeps the 128 ASCII characters as single bytes with identical codes. Characters beyond ASCII take two to four bytes in UTF-8, which the text lookup shows.

Worked example

The text “Hi!” is three ASCII characters: H is 72 (0x48, 0100 1000), i is 105 (0x69, 0110 1001) and ! is 33 (0x21, 0010 0001). Stored as bytes, “Hi!” is 01001000 01101001 00100001. Changing H to lowercase h flips one bit: 0110 1000 (104). In HTML, the exclamation mark could also be written as the numeric entity &#33;.

Line endings and invisible characters

Many “mysterious” text problems come from invisible ASCII codes. A file created on Windows ends each line with CR LF (13 10), while Linux and macOS use LF alone, so scripts sometimes fail with stray carriage returns. Tabs (9) and spaces (32) look alike but break tab-separated data. A zero byte (0) can cut off a string in older software. Paste suspicious text into the lookup box to reveal exactly which codes it contains.

Reading binary quickly

Split each byte into two groups of four bits (nibbles): each nibble is one hex digit. 0100 1000 is 4 and 8, so 0x48, which is 4 × 16 + 8 = 72. With a little practice, recognising the patterns for letters (010 or 011 at the start) and digits (0011) makes raw data dumps readable.

A short history of ASCII

ASCII — the American Standard Code for Information Interchange — was first published in 1963 and revised in the late 1960s, building on the codes used by teleprinters. It standardised how letters, digits and control signals were represented so that equipment from different manufacturers could exchange text. The international version, ISO 646, allowed some national variants, and 8-bit code pages later extended the range. Unicode, first published in 1991, kept ASCII as its first 128 code points, which is why ASCII still underpins almost all text on computers today.

ASCII in programming

TaskExample (many languages)
Character to codeord("A") → 65 (Python); "A".charCodeAt(0) → 65 (JavaScript)
Code to characterchr(65) → "A" (Python); String.fromCharCode(65) (JavaScript)
Uppercase to lowercaseAdd 32 to codes 65–90
Digit character to numberSubtract 48 (the code for 0)
Escape sequences\n is LF (10), \t is HT (9), \r is CR (13)

Because letters are in order, sorting by code sorts uppercase letters before lowercase ones — a common surprise when sorting mixed-case text.

Using the table in class

The ASCII reference pack

The optional pack includes a one-page printable ASCII chart (decimal, hex, binary and character), a control character reference, a binary alphabet sheet for classroom activities and an encoding worksheet with answers. The searchable table on this page is free.

AI-assisted content

This page was drafted with AI assistance and reviewed by Kedop. Codes follow the ASCII (US-ASCII / ISO 646 IRV) standard.

Frequently asked questions

What is the ASCII code for A?

65 in decimal, 0x41 in hex, 0100 0001 in binary.

What is the ASCII code for a space?

32 (0x20, 0010 0000).

How many ASCII characters are there?

128, numbered 0 to 127.

What is the difference between LF and CR?

LF (10) moves to a new line; CR (13) returns to the start of the line. Windows uses CR LF.

Is ASCII the same as UTF-8?

The first 128 UTF-8 characters are identical to ASCII; UTF-8 adds every other Unicode character.

What is extended ASCII?

Various 8-bit code pages using 128–255; they are not a single standard.

Why are there 8 bits if ASCII only needs 7?

Computers store data in 8-bit bytes; for ASCII the top bit is simply 0.

What is the ASCII code for the digit 0?

48 (0x30, 0011 0000).