Control Characters

Control characters in ASCII code are those that do not represent a visible symbol on the screen, but are used to control devices, such as printers or text terminals. These characters perform specific functions, such as controlling the position of the cursor, starting a new line, or signaling the end of a file.

ASCII code control character table

Complete list of ASCII commands and control characters ranging from 0 to 31.

DecimalOctalHexBinary
(8 bits)
Symbol /
Abbreviation
RepresentationDescription
0000000000 0000NULNull character
1001010000 0001SOHStart of Heading
2002020000 0010STXStart of Text
30030300000011ETX End of Text
40040400000100EOT End of Transmission
50050500000101ENQ Enquiry
60060600000110ACK Acknowledge
70070700000111BEL Bell, Alert
80100800001000BS Backspace
90110900001001HT Horizontal Tab
100120A00001010LF Line Feed
110130B00001011VT Vertical Tabulation
120140C00001100FF Form Feed
130150D00001101CR Carriage Return
140160E00001110SO Shift Out
150170F00001111SI Shift In
160201000010000DLE Data Link Escape
170211100010001DC1 Device Control One (XON)
180221200010010DC2 Device Control Two
190231300010011DC3 Device Control Three (XOFF)
200241400010100DC4 Device Control Four
210251500010101NAK Negative Acknowledge
220261600010110SYN Synchronous Idle
230271700010111ETB End of Transmission Block
240301800011000CAN Cancel
250311900011001EM End of medium
260321A00011010SUB Substitute
270331B00011011ESC Escape
280341C00011100FS File Separator
290351D00011101GS Group Separator
300361E00011110RS Record Separator
310371F00011111US Unit Separator
DecimalOctalHexBinarySymbol /
Abbreviation
RepresentationDescription
Non-printable control characters from the ASCII code table.

What are control characters?

As I mentioned at the beginning, control characters in the ASCII code are a set of codes that do not represent visible symbols such as letters or numbers, but are used to control the flow of data, the presentation of text, and the operations of devices such as printers or terminals. These characters occupy the first 32 values ​​of the ASCII table (from 0 to 31) plus the value 127, and are essential for communication in old and modern computer systems.

What is the function of control characters?

As the name suggests, these codes are responsible for telling a computer or device to perform an action. Some of the most common functions are:

  • Line Feed (LF, code 10): Moves the cursor to the next line.
  • Carriage Return (CR, code 13): Moves the cursor to the beginning of the line, similar to what a typewriter does.
  • Horizontal Tab (HT, code 9): Advances the cursor to the next tab position.
  • Delete (DEL, code 127): Deletes a character or line of text.
  • End of Text (ETX, code 3): Signals the end of a text transmission.

Control characters examples

  • 0 (NULL): Null character, used in many applications to indicate the end of a text string.
  • 7 (BEL): Activates or emits a bell or alert sound on the device (for example, a “beep”).
  • 8 (BS): Backspace, go back one character, like when you delete something.
  • 9 (TAB): Horizontal tabulation.
  • 10 (LF): Line Feed.
  • 13 (CR): Carriage Return.
  • 27 (ESC): Escape character, used to change modes on devices or initiate special sequences.
  • And character 127 (DEL): It is the “delete” character.

Use in modern systems

Although many of these control characters originated in older systems such as teletypewriters, they are still relevant in modern communication protocols and text file formats. For example, the carriage return and line feed are essential in systems such as Windows and Unix to indicate the end of a line of text.

In short, control characters are instructions that cannot be seen but play a crucial role in the organization, transmission and presentation of text in computer systems.