Binary Translator

ASCII Table

ASCII (US-ASCII) defines 128 codes, numbered 0 to 127: 33 control codes (0-31 and 127) and 95 printable characters (32-126). The table below shows each code in decimal, hexadecimal and 8-bit binary, with the character or the control code name.

ASCII codes 0 to 127
DecimalHexBinaryCharacterName
00000000000NULNull
10100000001SOHStart of Heading
20200000010STXStart of Text
30300000011ETXEnd of Text
40400000100EOTEnd of Transmission
50500000101ENQEnquiry
60600000110ACKAcknowledge
70700000111BELBell
80800001000BSBackspace
90900001001HTHorizontal Tab
100A00001010LFLine Feed
110B00001011VTVertical Tab
120C00001100FFForm Feed
130D00001101CRCarriage Return
140E00001110SOShift Out
150F00001111SIShift In
161000010000DLEData Link Escape
171100010001DC1Device Control 1
181200010010DC2Device Control 2
191300010011DC3Device Control 3
201400010100DC4Device Control 4
211500010101NAKNegative Acknowledge
221600010110SYNSynchronous Idle
231700010111ETBEnd of Transmission Block
241800011000CANCancel
251900011001EMEnd of Medium
261A00011010SUBSubstitute
271B00011011ESCEscape
281C00011100FSFile Separator
291D00011101GSGroup Separator
301E00011110RSRecord Separator
311F00011111USUnit Separator
322000100000(space)Space
332100100001!Exclamation mark
342200100010"Quotation mark
352300100011#Number sign
362400100100$Dollar sign
372500100101%Percent sign
382600100110&Ampersand
392700100111'Apostrophe
402800101000(Left parenthesis
412900101001)Right parenthesis
422A00101010*Asterisk
432B00101011+Plus sign
442C00101100,Comma
452D00101101-Hyphen-minus
462E00101110.Full stop
472F00101111/Slash
4830001100000Digit 0
4931001100011Digit 1
5032001100102Digit 2
5133001100113Digit 3
5234001101004Digit 4
5335001101015Digit 5
5436001101106Digit 6
5537001101117Digit 7
5638001110008Digit 8
5739001110019Digit 9
583A00111010:Colon
593B00111011;Semicolon
603C00111100<Less-than sign
613D00111101=Equals sign
623E00111110>Greater-than sign
633F00111111?Question mark
644001000000@At sign
654101000001AUppercase A
664201000010BUppercase B
674301000011CUppercase C
684401000100DUppercase D
694501000101EUppercase E
704601000110FUppercase F
714701000111GUppercase G
724801001000HUppercase H
734901001001IUppercase I
744A01001010JUppercase J
754B01001011KUppercase K
764C01001100LUppercase L
774D01001101MUppercase M
784E01001110NUppercase N
794F01001111OUppercase O
805001010000PUppercase P
815101010001QUppercase Q
825201010010RUppercase R
835301010011SUppercase S
845401010100TUppercase T
855501010101UUppercase U
865601010110VUppercase V
875701010111WUppercase W
885801011000XUppercase X
895901011001YUppercase Y
905A01011010ZUppercase Z
915B01011011[Left square bracket
925C01011100\Backslash
935D01011101]Right square bracket
945E01011110^Caret
955F01011111_Underscore
966001100000`Grave accent
976101100001aLowercase a
986201100010bLowercase b
996301100011cLowercase c
1006401100100dLowercase d
1016501100101eLowercase e
1026601100110fLowercase f
1036701100111gLowercase g
1046801101000hLowercase h
1056901101001iLowercase i
1066A01101010jLowercase j
1076B01101011kLowercase k
1086C01101100lLowercase l
1096D01101101mLowercase m
1106E01101110nLowercase n
1116F01101111oLowercase o
1127001110000pLowercase p
1137101110001qLowercase q
1147201110010rLowercase r
1157301110011sLowercase s
1167401110100tLowercase t
1177501110101uLowercase u
1187601110110vLowercase v
1197701110111wLowercase w
1207801111000xLowercase x
1217901111001yLowercase y
1227A01111010zLowercase z
1237B01111011{Left curly brace
1247C01111100|Vertical bar
1257D01111101}Right curly brace
1267E01111110~Tilde
1277F01111111DELDelete

How the table is organised

Codes 0 to 31 and 127 are control codes. They were designed to control teleprinters and data links, and a few are still used constantly: LF (10) ends a line on Unix-like systems, CR (13) returns the carriage and is paired with LF on Windows, HT (9) is the tab and ESC (27) starts terminal escape sequences. Code 32 is the space. Codes 48 to 57 are the digits, 65 to 90 the uppercase letters and 97 to 122 the lowercase letters.

Because the 128 codes fit in seven bits, an ASCII byte in a modern 8-bit system always has a leading 0. UTF-8 keeps these 128 codes unchanged, so every ASCII file is also a valid UTF-8 file.

Patterns worth knowing

A lowercase letter is its uppercase partner plus 32, so the two differ by one bit. The digit characters 0 to 9 start at code 48, so subtracting 48 from a digit character gives its numeric value. Every table row on this page is generated from the code number, not typed, so the decimal, hex and binary columns always agree.

Frequently asked questions

How many characters are in ASCII?
128: codes 0 to 127.
What is extended ASCII?
A loose name for various 8-bit character sets that add codes 128 to 255. They are not part of US-ASCII and differ between systems.
What is the ASCII code for A?
Decimal 65, hex 41, binary 01000001.
What is the difference between LF and CR?
LF (line feed, 10) moves down a line; CR (carriage return, 13) moves to the start of the line. Windows text uses CR LF, Unix uses LF.

Standards and references