Omni Calculator logo

How many ASCII characters are there? ASCII code set explained

You've probably heard of ASCII before. But do you know how many ASCII characters there are? And what are the ASCII codes and their functions? Whether you're debugging a program or exploring the principles behind digital information storage, understanding how to type ASCII characters is key — even if Unicode has taken over the digital world. So, let's look into an ASCII character table and show you how to work with all the codes.

🔎 If you want to know more about the basics of ASCII, check out our other article: "What is ASCII: The Universal Language of Computers".

Approximately, how many ASCII bit codes for characters exist? The simple, direct answer is 128. This set of characters is the backbone of the original, official standard. But if you ask a programmer, a system administrator, or anyone who wrestled with computers in the 1980s and 90s, you will almost certainly get a different answer: 256. This discrepancy isn't just a piece of trivia; it's the key to understanding one of the most chaotic and creative periods in the history of computing.

The ambiguity that surrounds this discrepancy is the tale of a simple, elegant standard driven to its endpoint — and the messy, incompatible ways that characterized an era of technology. If you're asking yourself, "How many ASCII characters are there?", then you must consider not only the original, 7-bit standard, but also its extended, 8-bit version, which was developed around its predecessor.

The American Standard Code for Information Interchange, or ASCII, completed in 1968, was a masterpiece of efficiency. It was developed during a period when every bit of information represented a valuable resource that could (and should) be conserved.

Therefore, a 7-bit ASCII code was developed. You may ask: "What is a bit?" Think of it as an on/off switch. One bit can either be a 1 or a 0, and in a 7-bit system, there exist 128 different combinations of ones and zeros, because 27 = 128 — therefore, this is how many ASCII characters were created.

These 128 slots, numbered 0 through 127, were brilliantly divided into two distinct groups: the visible characters and the hidden commands.

95 printable characters

This is the part of the ASCII character table that we see and use every day. Codes 32 through 126 are the visible, printable characters that appear on your screen. This set includes:

  • 26 uppercase English letters (A-Z);
  • 26 lowercase English letters (a-z),
  • 10 digits (0-9); and
  • 33 punctuation marks and symbols (like !, &, +, and the spacebar itself at code 32).

33 command characters

The first 32 codes (0-31) and the final one (127) are kind of like ghosts: you can't see them, but they're there, and they're doing their job. They are commands, not symbols, designed initially to control the physical mechanisms of 1960s-era teleprinters.

While most are now obsolete, they include commands like:

  • BEL (code 7): Instructed the receiving terminal to ring a physical bell to get the operator's attention.
  • BS (code 8): Backspace. Moved the print head one space back.
  • LF (code 10) and CR (13): "Line Feed" and "Carriage Return," used to tell a printer to move down a line and to the far left.

This set of 128 codes (33 control and 95 printable) was the complete, official standard. For its original purpose of processing data in American English, it was perfect.

So, if the standard is 128, where does 256 come from? The answer lies in the hardware. While ASCII was a 7-bit code, the computers it ran on were quickly standardizing on an 8-bit architecture. This 8-bit chunk of data became universally known as a "byte", which created a discrepancy:

  • Computers stored data in 8-bit bytes.
  • ASCII characters only required 7 bits to store. So, how many ASCII characters should there be, then?

This difference left one extra bit in every single byte of text. For a long time, this 8th bit was set to 0 or sometimes used as a "parity bit" for basic error checking. But leaving that bit empty was a tantalizing opportunity for hardware and software makers; using that extra 8th bit doubled the size of the character set. The math was simple: 28 = 256. This new, expanded 8-bit space (with codes 128 through 255) became known as extended ASCII. It allowed for 128 new characters. What are the ASCII codes of those?

The reality is that there was no single, official standard for Extended ASCII. The "extended" part of the chart became a digital Wild West. Everyone who needed more than the basic English alphabet created their own solution. A computer in Germany required the addition of ü and ß. A computer in Spain needed ñ and ¿. A business user wanted graphical symbols to draw boxes and menus. These different requirements led to hundreds of competing 8-bit code pages.

A code page is simply a map of the characters that reside in those 128 extended slots. While all code pages agreed on the first 128 standard ASCII characters, they were completely incompatible in the 128-255 range. For example:

  • Code Page 437 (The IBM PC): This was the original character set of the IBM PC and MS-DOS. In its 128 extra slots, it added accented characters for some European languages, a few Greek letters, math symbols, and – most famously – a set of box-drawing characters. These blocky lines, corners, and intersections (like │, ┌, and ╣) were the graphics of the pre-Windows era, used to build every menu, window, and interface in MS-DOS.

  • ISO 8859-1 (Latin-1): As computing became more international, the International Organization for Standardization (ISO) tried to fix the code page mess. Their solution was a series of 8-bit standards, and ISO 8859-1 became the default for the Americas, Western Europe, and the early World Wide Web. It was focused purely on language, adding all the necessary characters for Spanish, French, German, Portuguese, and the Nordic languages. It did not include the box-drawing characters.

🔎 If you want to know more about Unicode, the successor of ASCII, check out our dedicated article, "Why did UTF-8 replace ASCII?".

If you ever ask this question, fret not — as long as you stick to the 7-bit standard, you'll be fine. 😉 Let's look at the original ASCII character table:

Decimal

Binary

Character / Description

Decimal

Binary

Character / Description

Decimal

Binary

Character / Description

0

0000000

NUL (Null)

43

0101011

86

1010110

V

1

0000001

SOH (Start of Heading)

44

0101100

,

87

1010111

W

2

0000010

STX (Start of Text)

45

0101101

88

1011000

X

3

0000011

ETX (End of Text)

46

0101110

.

89

1011001

Y

4

0000100

EOT (End of Transmission)

47

0101111

/

90

1011010

Z

5

0000101

ENQ (Enquiry)

48

0110000

0

91

1011011

[

6

0000110

ACK (Acknowledge)

49

0110001

1

92

1011100

\

7

0000111

BEL (Bell)

50

0110010

2

93

1011101

]

8

0001000

BS (Backspace)

51

0110011

3

94

1011110

^

9

0001001

TAB (Horizontal Tab)

52

0110100

4

95

1011111

_

10

0001010

LF (Line Feed)

53

0110101

5

96

1100000

`

11

0001011

VT (Vertical Tab)

54

0110110

6

97

1100001

a

12

0001100

FF (Form Feed)

55

0110111

7

98

1100010

b

13

0001101

CR (Carriage Return)

56

0111000

8

99

1100011

c

14

0001110

SO (Shift Out)

57

0111001

9

100

1100100

d

15

0001111

SI (Shift In)

58

0111010

:

101

1100101

e

16

0010000

DLE (Data Link Escape)

59

0111011

;

102

1100110

f

17

0010001

DC1 (Device Control 1)

60

0111100

103

1100111

g

18

0010010

DC2 (Device Control 2)

61

0111101

=

104

1101000

h

19

0010011

DC3 (Device Control 3)

62

0111110

105

1101001

i

20

0010100

DC4 (Device Control 4)

63

0111111

?

106

1101010

j

21

0010101

NAK (Negative Acknowledge)

64

1000000

@

107

1101011

k

22

0010110

SYN (Synchronous Idle)

65

1000001

A

108

1101100

l

23

0010111

ETB (End of Transmission Block)

66

1000010

B

109

1101101

m

24

0011000

CAN (Cancel)

67

1000011

C

110

1101110

n

25

0011001

EM (End of Medium)

68

1000100

D

111

1101111

o

26

0011010

SUB (Substitute)

69

1000101

E

112

1110000

p

27

0011011

ESC (Escape)

70

1000110

F

113

1110001

q

28

0011100

FS (File Separator)

71

1000111

G

114

1110010

r

29

0011101

GS (Group Separator)

72

1001000

H

115

1110011

s

30

0011110

RS (Record Separator)

73

1001001

I

116

1110100

t

31

0011111

US (Unit Separator)

74

1001010

J

117

1110101

u

32

0100000

space

75

1001011

K

118

1110110

v

33

0100001

!

76

1001100

L

119

1110111

w

34

0100010

"

77

1001101

M

120

1111000

x

35

0100011

78

1001110

N

121

1111001

y

36

0100100

$

79

1001111

O

122

1111010

z

37

0100101

%

80

1010000

P

123

1111011

{

38

0100110

&

81

1010001

Q

124

1111100

39

0100111

'

82

1010010

R

125

1111101

}

40

0101000

(

83

1010011

S

126

1111110

~

41

0101001

)

84

1010100

T

127

1111111

DEL (Delete)

42

0101010

85

1010101

U

How to type ASCII characters

Very well, we now know every code from the ASCII character table. How do we use them? Well, first of all, you have to know that you can only type using ASCII and Unicode if you have a numeric keypad on a Windows computer. Once you have it, follow these steps:

  1. Look at an ASCII character table and take the desired code. For instance, let's type a Q (code 81).
  2. Go into a text box.
  3. Press Alt and hold.
  4. On your numeric keypad, type the code of your character in a quick succession.
  5. You will see a Q appear in your textbox!

If you need help with finding an ASCII code, you can also use our ASCII converter!

128 or 256, depending on:

  • Standard ASCII is a 7-bit code, which means there are 27, or 128, unique codes. These are numbered 0-127.
  • Extended ASCII refers to any 8-bit code that uses ASCII for its first 128 characters. This system has 28, or 256, unique codes.

This was a deliberate and very clever design choice that allowed early computers to convert text from uppercase to lowercase (or vice versa) by simply flipping one bit, an incredibly fast and simple operation that saved precious processing power.

  • A → 65 = 1000001
  • a → 97 = 1100001

This article was written by Agata Flak and reviewed by Steven Wooding.