Standard 7-bit ASCII Character Set Bits Dec Hex Chr --- ---- --- -- --- 000 0000 0 00 NUL 000 0001 1 01 SOH 000 0010 2 02 STX 000 0011 3 03 ETX 000 0100 4 04 EOT 000 0101 5 05 ENQ 000 0110 6 06 ACK 000 0111 7 07 BEL 000 1000 8 08 BS 000 1001 9 09 HT 000 1010 10 0A LF 000 1011 11 0B VT 000 1100 12 0C FF 000 1101 13 0D CR 000 1110 14 0E SO 000 1111 15 0F SI 001 0000 16 10 DLE 001 0001 17 11 DC1 001 0010 18 12 DC2 001 0011 19 13 DC3 001 0100 20 14 DC4 001 0101 21 15 NAK 001 0110 22 16 SYN 001 0111 23 17 ETB 001 1000 24 18 CAN 001 1001 25 19 EM 001 1010 26 1A SUB 001 1011 27 1B ESC 001 1100 28 1C FS 001 1101 29 1D GS 001 1110 30 1E RS 001 1111 31 1F US 010 0000 32 20 010 0001 33 21 ! 010 0010 34 22 " 010 0011 35 23 # 010 0100 36 24 $ 010 0101 37 25 % 010 0110 38 26 & 010 0111 39 27 ' 010 1000 40 28 ( 010 1001 41 29 ) 010 1010 42 2A * 010 1011 43 2B + 010 1100 44 2C , 010 1101 45 2D - 010 1110 46 2E . 010 1111 47 2F / 011 0000 48 30 0 011 0001 49 31 1 011 0010 50 32 2 011 0011 51 33 3 011 0100 52 34 4 011 0101 53 35 5 011 0110 54 36 6 011 0111 55 37 7 011 1000 56 38 8 011 1001 57 39 9 011 1010 58 3A : 011 1011 59 3B ; 011 1100 60 3C < 011 1101 61 3D = 011 1110 62 3E > 011 1111 63 3F ? 100 0000 64 40 @ 100 0001 65 41 A 100 0010 66 42 B 100 0011 67 43 C 100 0100 68 44 D 100 0101 69 45 E 100 0110 70 46 F 100 0111 71 47 G 100 1000 72 48 H 100 1001 73 49 I 100 1010 74 4A J 100 1011 75 4B K 100 1100 76 4C L 100 1101 77 4D M 100 1110 78 4E N 100 1111 79 4F O 101 0000 80 50 P 101 0001 81 51 Q 101 0010 82 52 R 101 0011 83 53 S 101 0100 84 54 T 101 0101 85 55 U 101 0110 86 56 V 101 0111 87 57 W 101 1000 88 58 X 101 1001 89 59 Y 101 1010 90 5A Z 101 1011 91 5B [ 101 1100 92 5C \ 101 1101 93 5D ] 101 1110 94 5E ^ 101 1111 95 5F _ 110 0000 96 60 ` 110 0001 97 61 a 110 0010 98 62 b 110 0011 99 63 c 110 0100 100 64 d 110 0101 101 65 e 110 0110 102 66 f 110 0111 103 67 g 110 1000 104 68 h 110 1001 105 69 i 110 1010 106 6A j 110 1011 107 6B k 110 1100 108 6C l 110 1101 109 6D m 110 1110 110 6E n 110 1111 111 6F o 111 0000 112 70 p 111 0001 113 71 q 111 0010 114 72 r 111 0011 115 73 s 111 0100 116 74 t 111 0101 117 75 u 111 0110 118 76 v 111 0111 119 77 w 111 1000 120 78 x 111 1001 121 79 y 111 1010 122 7A z 111 1011 123 7B { 111 1100 124 7C | 111 1101 125 7D } 111 1110 126 7E ~ 111 1111 127 7F DEL Control Character Descriptions ^ = terminal CONTROL key NUL ^@ Null character (various uses, such as padding) SOH ^A Start of Header STX ^B Start of Text ETX ^C End of Text EOT ^D End of Transmission ENQ ^D Enquiry (ask terminal who it is) ACK ^F Acknowledgment (data received, checks OK) BEL ^G Bell (make terminal beep) BS ^H Backspace (destructive or nondestructive depending on terminal) HT ^I Horizontal Tab (cursor left/right by determined amount) LF ^J Line feed (down one row in same column) VT ^K Vertical Tab (cursor up/down by determined amount) FF ^L Form feed (go to next page, useful with printers) CR ^M Carriage return (home cursor on same row) SO ^N Shift Out (change to terminal's standard characters) SI ^O Shift In (change to terminal's extended characters) DLE ^P Data Link Escape DC1 ^Q Device Control 1 (XON - old flow control protocol) DC2 ^R Device Control 2 DC3 ^S Device Control 3 (XOFF - old flow control protocol) DC4 ^T Device Control 4 NAK ^U Negative Acknowledgement (data received, check failed) SYN ^V Synchronous Idle (also used for control packets on Internet) ETB ^W End of Trans. Block CAN ^X Cancel EM ^Y End of Medium (used mostly on paper and magnetic tape) SUB ^Z Substitute (later an end of file marker in some OS) ESC ^[ Escape (often preceeded special control sequences on old terminals) FS ^\ File Separator GS ^] Group Separator RS ^^ Record Separator US ^_ Unit Separator DEL ^? Delete (usually means remove character after cursor) Old "ANSI" escape sequences (a subset of "VT100," an old DEC terminal) ESC = Escape = ^[ = 27 = 0x1B n = integer parameter (if omitted, default is usually 1) ESC[nA Move cursor n up ESC[nB Move cursor n down ESC[nC Move cursor n right ESC[nD Move cursor n left ESC[nE Move cursor to start of n lines down ESC[nF Move cursor to start of n lines up ESC[nG Move cursor to column n ESC[n;mH Move cursor to row n, column m ESC[nJ Clear to (n=0 or missing, end of screen) (n=1, beginning of screen) (n=2, clear screen) ESC[nK Clear to (n=0 or missing, end of line) (n=1, beginning of line) (n=2, clear line) ESC[nS Scroll page up n lines ESC[nT Scroll page down n lines ESC[n;mf Move cursor to row n, column m ESC[s Save cursor position ESC[u Restore cursor position ESC[?25l Hide cursor ESC[?25h Unhide cursor ESC[n[;k]n (where k is any number of parameters, and the last n is the character code, not a variable) These are graphic codes Implementations are all over the place n = : 0 Reset 1 Bright 2 Faint (when supported) 3 Italic/Inverse (when supported) 4 Underline 5 Slow blink 6 Fast blink 7 Inverse 8 Hide (when supported) 21 Underline 22 Normal brightness (same as reset intensity) 24 Underline off 25 Blink off 27 Inverse off 28 Hide off Higher codes are for text and background colors