ASCII at a glance
asciitable.co · X3.4-1967Table 1Columns are the top three bits, rows the bottom four. Each cell: hex, character, decimal. | 0_000 | 1_001 | 2_010 | 3_011 | 4_100 | 5_101 | 6_110 | 7_111 |
|---|
| _00000 | 00NUL0 | 10DLE16 | 20SP32 | 30048 | 40@64 | 50P80 | 60`96 | 70p112 |
|---|
| _10001 | 01SOH1 | 11DC117 | 21!33 | 31149 | 41A65 | 51Q81 | 61a97 | 71q113 |
|---|
| _20010 | 02STX2 | 12DC218 | 22"34 | 32250 | 42B66 | 52R82 | 62b98 | 72r114 |
|---|
| _30011 | 03ETX3 | 13DC319 | 23#35 | 33351 | 43C67 | 53S83 | 63c99 | 73s115 |
|---|
| _40100 | 04EOT4 | 14DC420 | 24$36 | 34452 | 44D68 | 54T84 | 64d100 | 74t116 |
|---|
| _50101 | 05ENQ5 | 15NAK21 | 25%37 | 35553 | 45E69 | 55U85 | 65e101 | 75u117 |
|---|
| _60110 | 06ACK6 | 16SYN22 | 26&38 | 36654 | 46F70 | 56V86 | 66f102 | 76v118 |
|---|
| _70111 | 07BEL7 | 17ETB23 | 27'39 | 37755 | 47G71 | 57W87 | 67g103 | 77w119 |
|---|
| _81000 | 08BS8 | 18CAN24 | 28(40 | 38856 | 48H72 | 58X88 | 68h104 | 78x120 |
|---|
| _91001 | 09HT9 | 19EM25 | 29)41 | 39957 | 49I73 | 59Y89 | 69i105 | 79y121 |
|---|
| _A1010 | 0ALF10 | 1ASUB26 | 2A*42 | 3A:58 | 4AJ74 | 5AZ90 | 6Aj106 | 7Az122 |
|---|
| _B1011 | 0BVT11 | 1BESC27 | 2B+43 | 3B;59 | 4BK75 | 5B[91 | 6Bk107 | 7B{123 |
|---|
| _C1100 | 0CFF12 | 1CFS28 | 2C,44 | 3C<60 | 4CL76 | 5C\92 | 6Cl108 | 7C|124 |
|---|
| _D1101 | 0DCR13 | 1DGS29 | 2D-45 | 3D=61 | 4DM77 | 5D]93 | 6Dm109 | 7D}125 |
|---|
| _E1110 | 0ESO14 | 1ERS30 | 2E.46 | 3E>62 | 4EN78 | 5E^94 | 6En110 | 7E~126 |
|---|
| _F1111 | 0FSI15 | 1FUS31 | 2F/47 | 3F?63 | 4FO79 | 5F_95 | 6Fo111 | 7FDEL127 |
|---|
C / JS escapes| \0 | 0x00 | Null |
|---|
| \a | 0x07 | Bell |
|---|
| \b | 0x08 | Backspace |
|---|
| \t | 0x09 | Horizontal tab |
|---|
| \n | 0x0A | Line feed |
|---|
| \v | 0x0B | Vertical tab |
|---|
| \f | 0x0C | Form feed |
|---|
| \r | 0x0D | Carriage return |
|---|
| \" | 0x22 | Quotation mark |
|---|
| \' | 0x27 | Apostrophe |
|---|
| \\ | 0x5C | Reverse solidus |
|---|
| \xHH | any | Any byte, by hex |
|---|
HTML entities| " | " | Quotation mark |
|---|
| & | & | Ampersand |
|---|
| ' | ' | Apostrophe |
|---|
| < | < | Less-than sign |
|---|
| > | > | Greater-than sign |
|---|
| &#N; | any | Any character, by decimal code |
|---|
Bit tricks| c ^ 0x20 | Flip a letter’s case |
|---|
| c & ~0x40 | Ctrl: @ A–Z [ \ ] ^ _ to 0x00–0x1F |
|---|
| c & 0x0F | A digit’s value |
|---|
| c - 0x30 | The same, for 0–9 |
|---|