How do you convert text to ASCII?
Replace each character with its number in the ASCII table. "Hello" becomes 72 101 108 108 111. Characters outside ASCII (accents, Korean, emoji) are shown as their Unicode code point, so "é" is 233 and "한" is 54620.
ASCII table (0–127)
Codes 0–31 and 127 are control characters; 32 is the space. Letters start at 65 (A) and 97 (a); digits at 48 (0).
| Dec | Hex | Binary | Character |
|---|---|---|---|
| 0 | 00 | 0000000 | NUL |
| 1 | 01 | 0000001 | SOH |
| 2 | 02 | 0000010 | STX |
| 3 | 03 | 0000011 | ETX |
| 4 | 04 | 0000100 | EOT |
| 5 | 05 | 0000101 | ENQ |
| 6 | 06 | 0000110 | ACK |
| 7 | 07 | 0000111 | BEL |
| 8 | 08 | 0001000 | BS |
| 9 | 09 | 0001001 | HT |
| 10 | 0A | 0001010 | LF |
| 11 | 0B | 0001011 | VT |
| 12 | 0C | 0001100 | FF |
| 13 | 0D | 0001101 | CR |
| 14 | 0E | 0001110 | SO |
| 15 | 0F | 0001111 | SI |
| 16 | 10 | 0010000 | DLE |
| 17 | 11 | 0010001 | DC1 |
| 18 | 12 | 0010010 | DC2 |
| 19 | 13 | 0010011 | DC3 |
| 20 | 14 | 0010100 | DC4 |
| 21 | 15 | 0010101 | NAK |
| 22 | 16 | 0010110 | SYN |
| 23 | 17 | 0010111 | ETB |
| 24 | 18 | 0011000 | CAN |
| 25 | 19 | 0011001 | EM |
| 26 | 1A | 0011010 | SUB |
| 27 | 1B | 0011011 | ESC |
| 28 | 1C | 0011100 | FS |
| 29 | 1D | 0011101 | GS |
| 30 | 1E | 0011110 | RS |
| 31 | 1F | 0011111 | US |
| 32 | 20 | 0100000 | Space |
| 33 | 21 | 0100001 | ! |
| 34 | 22 | 0100010 | " |
| 35 | 23 | 0100011 | # |
| 36 | 24 | 0100100 | $ |
| 37 | 25 | 0100101 | % |
| 38 | 26 | 0100110 | & |
| 39 | 27 | 0100111 | ' |
| 40 | 28 | 0101000 | ( |
| 41 | 29 | 0101001 | ) |
| 42 | 2A | 0101010 | * |
| 43 | 2B | 0101011 | + |
| 44 | 2C | 0101100 | , |
| 45 | 2D | 0101101 | - |
| 46 | 2E | 0101110 | . |
| 47 | 2F | 0101111 | / |
| 48 | 30 | 0110000 | 0 |
| 49 | 31 | 0110001 | 1 |
| 50 | 32 | 0110010 | 2 |
| 51 | 33 | 0110011 | 3 |
| 52 | 34 | 0110100 | 4 |
| 53 | 35 | 0110101 | 5 |
| 54 | 36 | 0110110 | 6 |
| 55 | 37 | 0110111 | 7 |
| 56 | 38 | 0111000 | 8 |
| 57 | 39 | 0111001 | 9 |
| 58 | 3A | 0111010 | : |
| 59 | 3B | 0111011 | ; |
| 60 | 3C | 0111100 | < |
| 61 | 3D | 0111101 | = |
| 62 | 3E | 0111110 | > |
| 63 | 3F | 0111111 | ? |
| 64 | 40 | 1000000 | @ |
| 65 | 41 | 1000001 | A |
| 66 | 42 | 1000010 | B |
| 67 | 43 | 1000011 | C |
| 68 | 44 | 1000100 | D |
| 69 | 45 | 1000101 | E |
| 70 | 46 | 1000110 | F |
| 71 | 47 | 1000111 | G |
| 72 | 48 | 1001000 | H |
| 73 | 49 | 1001001 | I |
| 74 | 4A | 1001010 | J |
| 75 | 4B | 1001011 | K |
| 76 | 4C | 1001100 | L |
| 77 | 4D | 1001101 | M |
| 78 | 4E | 1001110 | N |
| 79 | 4F | 1001111 | O |
| 80 | 50 | 1010000 | P |
| 81 | 51 | 1010001 | Q |
| 82 | 52 | 1010010 | R |
| 83 | 53 | 1010011 | S |
| 84 | 54 | 1010100 | T |
| 85 | 55 | 1010101 | U |
| 86 | 56 | 1010110 | V |
| 87 | 57 | 1010111 | W |
| 88 | 58 | 1011000 | X |
| 89 | 59 | 1011001 | Y |
| 90 | 5A | 1011010 | Z |
| 91 | 5B | 1011011 | [ |
| 92 | 5C | 1011100 | \ |
| 93 | 5D | 1011101 | ] |
| 94 | 5E | 1011110 | ^ |
| 95 | 5F | 1011111 | _ |
| 96 | 60 | 1100000 | ` |
| 97 | 61 | 1100001 | a |
| 98 | 62 | 1100010 | b |
| 99 | 63 | 1100011 | c |
| 100 | 64 | 1100100 | d |
| 101 | 65 | 1100101 | e |
| 102 | 66 | 1100110 | f |
| 103 | 67 | 1100111 | g |
| 104 | 68 | 1101000 | h |
| 105 | 69 | 1101001 | i |
| 106 | 6A | 1101010 | j |
| 107 | 6B | 1101011 | k |
| 108 | 6C | 1101100 | l |
| 109 | 6D | 1101101 | m |
| 110 | 6E | 1101110 | n |
| 111 | 6F | 1101111 | o |
| 112 | 70 | 1110000 | p |
| 113 | 71 | 1110001 | q |
| 114 | 72 | 1110010 | r |
| 115 | 73 | 1110011 | s |
| 116 | 74 | 1110100 | t |
| 117 | 75 | 1110101 | u |
| 118 | 76 | 1110110 | v |
| 119 | 77 | 1110111 | w |
| 120 | 78 | 1111000 | x |
| 121 | 79 | 1111001 | y |
| 122 | 7A | 1111010 | z |
| 123 | 7B | 1111011 | { |
| 124 | 7C | 1111100 | | |
| 125 | 7D | 1111101 | } |
| 126 | 7E | 1111110 | ~ |
| 127 | 7F | 1111111 | DEL |
What is the difference between ASCII and Unicode?
ASCII defines 128 characters: English letters, digits, punctuation and control codes. Unicode includes all of ASCII with the same numbers and adds over 150,000 characters for other scripts and emoji. UTF-8 stores the ASCII range as single bytes, which is why plain English text is identical in ASCII and UTF-8.
What is extended ASCII?
Codes 128–255 were used by various 8-bit code pages (such as Windows-1252 or ISO-8859-1) with different characters in each. They are not part of ASCII itself, so this converter uses Unicode code points for anything above 127.
ASCII codes in programming
| Language | Character → code | Code → character |
|---|---|---|
| Python | ord("A") → 65 | chr(65) |
| JavaScript | "A".codePointAt(0) | String.fromCodePoint(65) |
| C / C++ | (int)'A' | (char)65 |
| Excel | =CODE("A") | =CHAR(65) |
Sources: RFC 20, ASCII format for network interchange · RFC 3629 (UTF-8). Checked October 2026.