Toolman

ASCII table

All 128 codes, with the control characters explained rather than left as blank cells.

To see a whole string in binary, hex and UTF-8 bytes at once, use the text to binary converter.

Control characters (0–31)

DecHexBinaryAbbrName
00x0000000000NULNull
10x0100000001SOHStart of Heading
20x0200000010STXStart of Text
30x0300000011ETXEnd of Text
40x0400000100EOTEnd of Transmission
50x0500000101ENQEnquiry
60x0600000110ACKAcknowledge
70x0700000111BELBell
80x0800001000BSBackspace
90x0900001001HTHorizontal Tab
100x0A00001010LFLine Feed
110x0B00001011VTVertical Tab
120x0C00001100FFForm Feed
130x0D00001101CRCarriage Return
140x0E00001110SOShift Out
150x0F00001111SIShift In
160x1000010000DLEData Link Escape
170x1100010001DC1Device Control 1 (XON)
180x1200010010DC2Device Control 2
190x1300010011DC3Device Control 3 (XOFF)
200x1400010100DC4Device Control 4
210x1500010101NAKNegative Acknowledge
220x1600010110SYNSynchronous Idle
230x1700010111ETBEnd of Transmission Block
240x1800011000CANCancel
250x1900011001EMEnd of Medium
260x1A00011010SUBSubstitute
270x1B00011011ESCEscape
280x1C00011100FSFile Separator
290x1D00011101GSGroup Separator
300x1E00011110RSRecord Separator
310x1F00011111USUnit Separator

Printable characters (32–126)

DecHexBinaryCharName
320x2000100000spaceSpace
330x2100100001!Exclamation mark
340x2200100010"Double quote
350x2300100011#Number sign
360x2400100100$Dollar sign
370x2500100101%Percent sign
380x2600100110&Ampersand
390x2700100111'Apostrophe
400x2800101000(Left parenthesis
410x2900101001)Right parenthesis
420x2A00101010*Asterisk
430x2B00101011+Plus sign
440x2C00101100,Comma
450x2D00101101-Hyphen-minus
460x2E00101110.Full stop
470x2F00101111/Solidus
480x30001100000Digit 0
490x31001100011Digit 1
500x32001100102Digit 2
510x33001100113Digit 3
520x34001101004Digit 4
530x35001101015Digit 5
540x36001101106Digit 6
550x37001101117Digit 7
560x38001110008Digit 8
570x39001110019Digit 9
580x3A00111010:Colon
590x3B00111011;Semicolon
600x3C00111100<Less-than sign
610x3D00111101=Equals sign
620x3E00111110>Greater-than sign
630x3F00111111?Question mark
640x4001000000@Commercial at
650x4101000001ACapital letter A
660x4201000010BCapital letter B
670x4301000011CCapital letter C
680x4401000100DCapital letter D
690x4501000101ECapital letter E
700x4601000110FCapital letter F
710x4701000111GCapital letter G
720x4801001000HCapital letter H
730x4901001001ICapital letter I
740x4A01001010JCapital letter J
750x4B01001011KCapital letter K
760x4C01001100LCapital letter L
770x4D01001101MCapital letter M
780x4E01001110NCapital letter N
790x4F01001111OCapital letter O
800x5001010000PCapital letter P
810x5101010001QCapital letter Q
820x5201010010RCapital letter R
830x5301010011SCapital letter S
840x5401010100TCapital letter T
850x5501010101UCapital letter U
860x5601010110VCapital letter V
870x5701010111WCapital letter W
880x5801011000XCapital letter X
890x5901011001YCapital letter Y
900x5A01011010ZCapital letter Z
910x5B01011011[Left square bracket
920x5C01011100\Reverse solidus
930x5D01011101]Right square bracket
940x5E01011110^Circumflex accent
950x5F01011111_Low line
960x6001100000`Grave accent
970x6101100001aSmall letter a
980x6201100010bSmall letter b
990x6301100011cSmall letter c
1000x6401100100dSmall letter d
1010x6501100101eSmall letter e
1020x6601100110fSmall letter f
1030x6701100111gSmall letter g
1040x6801101000hSmall letter h
1050x6901101001iSmall letter i
1060x6A01101010jSmall letter j
1070x6B01101011kSmall letter k
1080x6C01101100lSmall letter l
1090x6D01101101mSmall letter m
1100x6E01101110nSmall letter n
1110x6F01101111oSmall letter o
1120x7001110000pSmall letter p
1130x7101110001qSmall letter q
1140x7201110010rSmall letter r
1150x7301110011sSmall letter s
1160x7401110100tSmall letter t
1170x7501110101uSmall letter u
1180x7601110110vSmall letter v
1190x7701110111wSmall letter w
1200x7801111000xSmall letter x
1210x7901111001ySmall letter y
1220x7A01111010zSmall letter z
1230x7B01111011{Left curly bracket
1240x7C01111100|Vertical line
1250x7D01111101}Right curly bracket
1260x7E01111110~Tilde

Delete (127)

1270x7F01111111DELDelete

Why the table is laid out this way

ASCII is seven bits, giving 128 codes, and almost none of the arrangement is arbitrary. Three decisions are worth knowing because they are still exploited in code today.

Digits start at 48. The low four bits of each digit code are the digit's own value, so c - '0' converts a character to a number, and c & 0x0F does the same with a mask. Every parser ever written relies on this.

Capitals and lowercase are 32 apart. A is 65 and a is 97; Z is 90 and z is 122. Thirty-two is a single bit, so c ^ 32 flips case and c | 32 forces lowercase. This is why case-insensitive comparison used to be free.

Control characters map to Ctrl plus a letter. The Ctrl key originally cleared the top two bits of the keyboard code. C is 67, so Ctrl+C sends 3, which is ETX, end-of-text. That is the entire reason Ctrl+C interrupts a program, Ctrl+D signals end-of-file, and Ctrl+G makes the terminal beep.

The control characters that still matter

CodeNameWhy you still meet it
0NULEnds a C string. A NUL in your data truncates it silently.
9TabIts width is a display convention, not a property of the character.
10LFThe Unix line ending, and half of the Windows one.
13CRThe other half. CR alone lets a progress bar overwrite its own line.
27ESCStarts every ANSI escape sequence — all terminal colour and cursor movement.
127DELWhat most terminals actually send for the Backspace key.

ASCII, Latin-1 and UTF-8

ASCII defines only 0–127. Everything above that — accented letters, currency symbols, anything non-English — belongs to some other encoding, and the confusion between them is where mojibake comes from.

UTF-8 was designed so that its first 128 code points are byte-for-byte identical to ASCII. Any ASCII file is already valid UTF-8, which is the single reason UTF-8 won: existing files and existing C code kept working unchanged. Characters above 127 become two to four bytes, each with its high bit set, so they can never be mistaken for an ASCII character.

That is why a UTF-8 file read as Latin-1 shows é where é should be: the two bytes of the UTF-8 encoding are being displayed as two separate Latin-1 characters. The bytes are correct; the interpretation is not.