Character Encoding

ASCII Table

Explore the 7-bit ASCII standard, search individual codes, and turn text into hexadecimal byte values. Learn where ASCII stops and how it differs from Unicode and UTF-8.

By The End Of This Lesson

  • Match an ASCII character with its decimal, hexadecimal, and binary code.
  • Distinguish a number from the text characters used to write it.
  • Recognise ASCII's limits and distinguish Unicode code points from UTF-8 bytes.

Why Character Encoding Matters

A stored number does not identify its meaning by itself. An encoding supplies a shared mapping between characters and numeric codes. Reading a text file or a packet therefore involves both the bytes and the rules used to interpret them.

Readable Text

ASCII assigns codes to English letters, digits, punctuation, and space. Case matters: uppercase A and lowercase a have different codes.

Control Characters

Codes such as tab, line feed, and carriage return affect text structure. They are not visible letters, but they still occupy positions in the data.

Worked Example: The Number 7 And The Character 7

The numeric value seven, represented as an unsigned byte, differs from the ASCII character used to write the digit "7". The table assigns that character decimal code 55. Its hexadecimal value is 37 because 3 × 16 + 7 = 55.

Numeric Value Seven

710 = 0716 = 0000 01112

ASCII Character "7"

5510 = 3716 = 0011 01112

ASCII has seven-bit codes. When stored in eight-bit bytes, their leading bit is zero. The text 42 contains two characters, with ASCII bytes 34 32; it is not the single numeric byte 2A.

ASCII Text To Hex

Enter ASCII text to see one two-digit hexadecimal byte per character. Spaces and newlines also have codes. Non-ASCII characters must be removed before conversion or copying.

Live conversion updates as you type.

Enter ASCII text to begin. Empty input has no bytes.

ASCII At A Glance

Control

0–31, 127

Non-printable codes, including DEL at 127, for control and text flow.

Printable

32-126

Letters, digits, punctuation, and space. Space is printable even though it has no visible mark.

Standard

7-bit

128 total codes forming the original common text encoding baseline.

Beyond ASCII: Unicode And UTF-8

ASCII cannot represent £ or emoji. Unicode assigns code points to a much wider set of characters; UTF-8 is a way to encode those code points as bytes. A code point written in hexadecimal is not necessarily the byte sequence stored in a UTF-8 file.

For example, £ has code point U+00A3 and UTF-8 bytes C2 A3. The grinning-face emoji has code point U+1F600 and UTF-8 bytes F0 9F 98 80. Neither has an ASCII code. ASCII characters retain their single-byte values in UTF-8.

This converter deliberately stays within ASCII. For the byte-encoding rules, see RFC 3629: UTF-8 definition.

Complete ASCII Table

Search by decimal code, hex value, character, or description.

DecHexCharDescriptionType
000NULNullcontrol
101SOHStart of Headingcontrol
202STXStart of Textcontrol
303ETXEnd of Textcontrol
404EOTEnd of Transmissioncontrol
505ENQEnquirycontrol
606ACKAcknowledgecontrol
707BELBellcontrol
808BSBackspacecontrol
909HTHorizontal Tabcontrol
100ALFLine Feedcontrol
110BVTVertical Tabcontrol
120CFFForm Feedcontrol
130DCRCarriage Returncontrol
140ESOShift Outcontrol
150FSIShift Incontrol
1610DLEData Link Escapecontrol
1711DC1Device Control 1control
1812DC2Device Control 2control
1913DC3Device Control 3control
2014DC4Device Control 4control
2115NAKNegative Acknowledgecontrol
2216SYNSynchronous Idlecontrol
2317ETBEnd of Transmission Blockcontrol
2418CANCancelcontrol
2519EMEnd of Mediumcontrol
261ASUBSubstitutecontrol
271BESCEscapecontrol
281CFSFile Separatorcontrol
291DGSGroup Separatorcontrol
301ERSRecord Separatorcontrol
311FUSUnit Separatorcontrol
3220SPSpaceprintable
3321!Exclamation markprintable
3422"Quotation markprintable
3523#Number signprintable
3624$Dollar signprintable
3725%Percent signprintable
3826&Ampersandprintable
3927'Apostropheprintable
4028(Left parenthesisprintable
4129)Right parenthesisprintable
422A*Asteriskprintable
432B+Plus signprintable
442C,Commaprintable
452D-Hyphenprintable
462E.Periodprintable
472F/Forward slashprintable
48300Digit 0printable
49311Digit 1printable
50322Digit 2printable
51333Digit 3printable
52344Digit 4printable
53355Digit 5printable
54366Digit 6printable
55377Digit 7printable
56388Digit 8printable
57399Digit 9printable
583A:Colonprintable
593B;Semicolonprintable
603C<Less thanprintable
613D=Equals signprintable
623E>Greater thanprintable
633F?Question markprintable
6440@At signprintable
6541AUppercase Aprintable
6642BUppercase Bprintable
6743CUppercase Cprintable
6844DUppercase Dprintable
6945EUppercase Eprintable
7046FUppercase Fprintable
7147GUppercase Gprintable
7248HUppercase Hprintable
7349IUppercase Iprintable
744AJUppercase Jprintable
754BKUppercase Kprintable
764CLUppercase Lprintable
774DMUppercase Mprintable
784ENUppercase Nprintable
794FOUppercase Oprintable
8050PUppercase Pprintable
8151QUppercase Qprintable
8252RUppercase Rprintable
8353SUppercase Sprintable
8454TUppercase Tprintable
8555UUppercase Uprintable
8656VUppercase Vprintable
8757WUppercase Wprintable
8858XUppercase Xprintable
8959YUppercase Yprintable
905AZUppercase Zprintable
915B[Left bracketprintable
925C\Backslashprintable
935D]Right bracketprintable
945E^Caretprintable
955F_Underscoreprintable
9660`Grave accentprintable
9761aLowercase aprintable
9862bLowercase bprintable
9963cLowercase cprintable
10064dLowercase dprintable
10165eLowercase eprintable
10266fLowercase fprintable
10367gLowercase gprintable
10468hLowercase hprintable
10569iLowercase iprintable
1066AjLowercase jprintable
1076BkLowercase kprintable
1086ClLowercase lprintable
1096DmLowercase mprintable
1106EnLowercase nprintable
1116FoLowercase oprintable
11270pLowercase pprintable
11371qLowercase qprintable
11472rLowercase rprintable
11573sLowercase sprintable
11674tLowercase tprintable
11775uLowercase uprintable
11876vLowercase vprintable
11977wLowercase wprintable
12078xLowercase xprintable
12179yLowercase yprintable
1227AzLowercase zprintable
1237B{Left braceprintable
1247C|Vertical barprintable
1257D}Right braceprintable
1267E~Tildeprintable
1277FDELDeletecontrol

Practise Reading Encoded Text

Predict the hex bytes for A7, then test them above. Add a space between the characters and explain the new byte. Finally try £ and explain why an ASCII converter reports an error instead of inventing an ASCII code.

Reveal the practice answers

A7 becomes 41 37. With a space, A 7 becomes 41 20 37. The £ character is outside ASCII's range and needs another encoding, such as UTF-8.

Use Build the Byte to represent decimal 65. Check that its hex byte is 41, then find that code in the ASCII table. The same bits can represent a number or a character depending on how the data is interpreted.

Check Your Understanding

Try these without the converter or reference table. Check each answer to reveal its explanation.

1. What is the ASCII hexadecimal byte for the text character 7?

Choose an answer before checking. You can change your choice and try again.

2. Which codes are non-printable ASCII control codes?

Choose an answer before checking. You can change your choice and try again.

3. Why does this ASCII converter reject £?

Choose an answer before checking. You can change your choice and try again.