PortDock

ASCII Table & Control Characters

ASCII 0–127 in decimal, hex, binary and text, with names, caret and escape notation for control characters like STX, ETX, ACK, NAK, CR, LF, XON and XOFF.

DecHexBinaryChar / abbr.NameNotation
0000000000NULNull^@ \0
1010000001SOHStart of Heading^A
2020000010STXStart of Text^B
3030000011ETXEnd of Text^C
4040000100EOTEnd of Transmission^D
5050000101ENQEnquiry^E
6060000110ACKAcknowledge^F
7070000111BELBell^G \a
8080001000BSBackspace^H \b
9090001001HTHorizontal Tabulation^I \t
100A0001010LFLine Feed^J \n
110B0001011VTVertical Tabulation^K \v
120C0001100FFForm Feed^L \f
130D0001101CRCarriage Return^M \r
140E0001110SOShift Out^N
150F0001111SIShift In^O
16100010000DLEData Link Escape^P
17110010001DC1Device Control 1^Q
18120010010DC2Device Control 2^R
19130010011DC3Device Control 3^S
20140010100DC4Device Control 4 (Stop)^T
21150010101NAKNegative Acknowledge^U
22160010110SYNSynchronous Idle^V
23170010111ETBEnd of Transmission Block^W
24180011000CANCancel^X
25190011001EMEnd of Medium^Y
261A0011010SUBSubstitute^Z
271B0011011ESCEscape^[ \x1B
281C0011100FSFile Separator^\
291D0011101GSGroup Separator^]
301E0011110RSRecord Separator^^
311F0011111USUnit Separator^_
32200100000SPSpace
33210100001!
34220100010"
35230100011#
36240100100$
37250100101%
38260100110&
39270100111'
40280101000(
41290101001)
422A0101010*
432B0101011+
442C0101100,
452D0101101-
462E0101110.
472F0101111/
483001100000
493101100011
503201100102
513301100113
523401101004
533501101015
543601101106
553701101117
563801110008
573901110019
583A0111010:
593B0111011;
603C0111100<
613D0111101=
623E0111110>
633F0111111?
64401000000@
65411000001A
66421000010B
67431000011C
68441000100D
69451000101E
70461000110F
71471000111G
72481001000H
73491001001I
744A1001010J
754B1001011K
764C1001100L
774D1001101M
784E1001110N
794F1001111O
80501010000P
81511010001Q
82521010010R
83531010011S
84541010100T
85551010101U
86561010110V
87571010111W
88581011000X
89591011001Y
905A1011010Z
915B1011011[
925C1011100\
935D1011101]
945E1011110^
955F1011111_
96601100000`
97611100001a
98621100010b
99631100011c
100641100100d
101651100101e
102661100110f
103671100111g
104681101000h
105691101001i
1066A1101010j
1076B1101011k
1086C1101100l
1096D1101101m
1106E1101110n
1116F1101111o
112701110000p
113711110001q
114721110010r
115731110011s
116741110100t
117751110101u
118761110110v
119771110111w
120781111000x
121791111001y
1227A1111010z
1237B1111011{
1247C1111100|
1257D1111101}
1267E1111110~
1277F1111111DELDelete^?

The find box only filters the table in your browser. Nothing you type is sent anywhere.

Control characters you meet on serial links

HexAbbr.Common use
02 · 03STX · ETXMark the start and end of a frame. Many vendor protocols use «STX text ETX checksum» (whether the checksum covers STX varies by manual).
05ENQSome protocols send it as a «please reply» request.
06 · 15ACK · NAKReceived / not received (send again).
0D · 0ACR · LFLine endings. Devices expect CR, LF or CR LF — if commands are ignored, match the line ending first.
11 · 13DC1 · DC3Software flow control XON (resume) and XOFF (stop). With it enabled, raw 11 and 13 bytes must not appear in the data.
1BESCStarts terminal control sequences (ESC [ …).
00NULEmpty byte; some devices use it to end a string.

128–255 and non-Latin text

  • ASCII stops at 7 bits (0–127). Bytes 128–255 depend on the code page (ISO 8859-1, CP949 and others), so they are not in this table.
  • Korean, Chinese and Japanese characters take several bytes — 3 in UTF-8, 2 in CP949 for Korean. Garbled text between a device and a PC usually means different encodings.
  • Caret notation ^M is the code Ctrl+M produces (0x0D); the escape \r is how C-like languages write it in strings.

FAQ

What are CR and LF?

CR (carriage return) is 13 (0x0D) and LF (line feed) is 10 (0x0A). Windows text files end lines with CR LF (0D 0A).

Is the character '0' the same as the value 0?

No. The character '0' is 48 (0x30); the value 0 is NUL (0x00). A device sending numbers as ASCII sends '1' '2' '3' as 31 32 33.

How far apart are upper and lower case?

32 (0x20). 'A' is 65 (0x41) and 'a' is 97 (0x61) — they differ in one bit.

Is DEL (0x7F) a control character?

RFC 20 lists DEL with the control characters but notes that «in the strict sense, DEL is not a control character». This table marks it with the controls.

To turn bytes into text or text into bytes, use the HEX ↔ ASCII Converter.

Sources