How to Use the Converter?
To use the converter, simply type or paste your text into the ASCII Input box, and the HEX result will appear instantly in the output box. You can choose how the result is shown, such as with spaces, no spaces, commas, prefixes, or a custom separator.
You can also drag and drop a text file into the input box to convert its contents automatically. Once the conversion appears, use the copy button to quickly copy the HEX output.
What HEX and ASCII Means
To understand ASCII to HEX conversion, you first need a strong idea of what hexadecimal numbers are and what ASCII is.
In ordinary math, we usually use the decimal system, which is base $10$. That means each place value is a power of $10$. For example, in the number $47$, the $4$ means four tens and the $7$ means seven ones.
In hexadecimal, however, each place value is a power of $16$. So in the HEX number $41$, the $4$ is in the $16^1$ place and the $1$ is in the $16^0$ place.
$$\begin{aligned} 41_{16} &= 4 \times 16^1 + 1 \times 16^0 \\[10pt] &= 64 + 1 \\[10pt] &= 65_{10} \end{aligned}$$
This means that the HEX number $41$ is equal to decimal $65$.
Now let’s understand what ASCII means.
ASCII, which stands for American Standard Code for Information Interchange, is a coding system that assigns numbers to characters so computers can store and display text. Computers do not “see” letters the way humans do. They store numbers, and those numbers are interpreted as characters.
For example, the uppercase letter $A$ is ASCII decimal $65$, lowercase $a$ is ASCII decimal $97$, and the digit $5$ is ASCII decimal $53$. These same ASCII values can also be written in HEX.
$$ 65_{10} = 41_{16} = A_{ASCII} $$
$$ 97_{10} = 61_{16}= a_{ASCII} $$
$$ 53_{10} = 35_{16}= 5_{ASCII} $$
So if you see HEX $41$, it represents the ASCII character $A$. If you see HEX $61$, it represents the ASCII character $a$. If you see HEX $35$, it represents the character $5$.
This is important because people often think HEX $35$ means the number thirty-five. In ASCII conversion, it usually means the character whose code is $35$ in HEX, which happens to be the symbol $5$. That is why context matters.
How to Convert ASCII to HEX
To convert ASCII to HEX, follow this simple method:
- Take one character at a time.
- Find its ASCII decimal code from the ASCII table.
- Convert that decimal code into hexadecimal.
For example, suppose we want to convert $A$ to HEX.
Its ASCII decimal value is $65$. Now convert decimal $65$ to hexadecimal:
$$ 65 \div 16 = 4 \text{ remainder } 1 $$
So the HEX value is $41$. Therefore:
$$ A \rightarrow 65_{10} \rightarrow 41_{16} $$
This tells us that the ASCII character $A$ is written as HEX $41$.
Let us try another one. The lowercase letter $a$ has ASCII decimal value $97$. Now convert $97$ into hexadecimal:
$$ 97 \div 16 = 6 \text{ remainder } 1 $$
So the hexadecimal form is $61$. Therefore:
$$ a \rightarrow 97_{10} \rightarrow 61_{16} $$
ASCII Table
Here is the full list of ASCII characters and their corresponding values for your quick reference.
| Decimal | Hex | Symbol | Decimal | Hex | Symbol | Decimal | Hex | Symbol | ||
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 00 | NULL | 86 | 56 | V | 172 | AC | ¬ | ||
| 1 | 01 | SOH | 87 | 57 | W | 173 | AD | | ||
| 2 | 02 | STX | 88 | 58 | X | 174 | AE | ® | ||
| 3 | 03 | ETX | 89 | 59 | Y | 175 | AF | ¯ | ||
| 4 | 04 | EOT | 90 | 5A | Z | 176 | B0 | ° | ||
| 5 | 05 | ENQ | 91 | 5B | [ | 177 | B1 | ± | ||
| 6 | 06 | ACK | 92 | 5C | \ | 178 | B2 | ² | ||
| 7 | 07 | BEL | 93 | 5D | ] | 179 | B3 | ³ | ||
| 8 | 08 | BS | 94 | 5E | ^ | 180 | B4 | ´ | ||
| 9 | 09 | HT | 95 | 5F | _ | 181 | B5 | µ | ||
| 10 | 0A | LF | 96 | 60 | ` | 182 | B6 | ¶ | ||
| 11 | 0B | VT | 97 | 61 | a | 183 | B7 | · | ||
| 12 | 0C | FF | 98 | 62 | b | 184 | B8 | ¸ | ||
| 13 | 0D | CR | 99 | 63 | c | 185 | B9 | ¹ | ||
| 14 | 0E | SO | 100 | 64 | d | 186 | BA | º | ||
| 15 | 0F | SI | 101 | 65 | e | 187 | BB | » | ||
| 16 | 10 | DLE | 102 | 66 | f | 188 | BC | ¼ | ||
| 17 | 11 | DC1 | 103 | 67 | g | 189 | BD | ½ | ||
| 18 | 12 | DC2 | 104 | 68 | h | 190 | BE | ¾ | ||
| 19 | 13 | DC3 | 105 | 69 | i | 191 | BF | ¿ | ||
| 20 | 14 | DC4 | 106 | 6A | j | 192 | C0 | À | ||
| 21 | 15 | NAK | 107 | 6B | k | 193 | C1 | Á | ||
| 22 | 16 | SYN | 108 | 6C | l | 194 | C2 | Â | ||
| 23 | 17 | ETB | 109 | 6D | m | 195 | C3 | Ã | ||
| 24 | 18 | CAN | 110 | 6E | n | 196 | C4 | Ä | ||
| 25 | 19 | EM | 111 | 6F | o | 197 | C5 | Å | ||
| 26 | 1A | SUB | 112 | 70 | p | 198 | C6 | Æ | ||
| 27 | 1B | ESC | 113 | 71 | q | 199 | C7 | Ç | ||
| 28 | 1C | FS | 114 | 72 | r | 200 | C8 | È | ||
| 29 | 1D | GS | 115 | 73 | s | 201 | C9 | É | ||
| 30 | 1E | RS | 116 | 74 | t | 202 | CA | Ê | ||
| 31 | 1F | US | 117 | 75 | u | 203 | CB | Ë | ||
| 32 | 20 | space | 118 | 76 | v | 204 | CC | Ì | ||
| 33 | 21 | ! | 119 | 77 | w | 205 | CD | Í | ||
| 34 | 22 | “ | 120 | 78 | x | 206 | CE | Î | ||
| 35 | 23 | # | 121 | 79 | y | 207 | CF | Ï | ||
| 36 | 24 | $ | 122 | 7A | z | 208 | D0 | Ð | ||
| 37 | 25 | % | 123 | 7B | { | 209 | D1 | Ñ | ||
| 38 | 26 | & | 124 | 7C | | | 210 | D2 | Ò | ||
| 39 | 27 | ‘ | 125 | 7D | } | 211 | D3 | Ó | ||
| 40 | 28 | ( | 126 | 7E | ~ | 212 | D4 | Ô | ||
| 41 | 29 | ) | 127 | 7F | DEL | 213 | D5 | Õ | ||
| 42 | 2A | * | 128 | 80 | PAD | 214 | D6 | Ö | ||
| 43 | 2B | + | 129 | 81 | HOP | 215 | D7 | × | ||
| 44 | 2C | , | 130 | 82 | BPH | 216 | D8 | Ø | ||
| 45 | 2D | – | 131 | 83 | NBH | 217 | D9 | Ù | ||
| 46 | 2E | . | 132 | 84 | IND | 218 | DA | Ú | ||
| 47 | 2F | / | 133 | 85 | NEL | 219 | DB | Û | ||
| 48 | 30 | 0 | 134 | 86 | SSA | 220 | DC | Ü | ||
| 49 | 31 | 1 | 135 | 87 | ESA | 221 | DD | Ý | ||
| 50 | 32 | 2 | 136 | 88 | HTS | 222 | DE | Þ | ||
| 51 | 33 | 3 | 137 | 89 | HTJ | 223 | DF | ß | ||
| 52 | 34 | 4 | 138 | 8A | VTS | 224 | E0 | à | ||
| 53 | 35 | 5 | 139 | 8B | PLD | 225 | E1 | á | ||
| 54 | 36 | 6 | 140 | 8C | PLU | 226 | E2 | â | ||
| 55 | 37 | 7 | 141 | 8D | RI | 227 | E3 | ã | ||
| 56 | 38 | 8 | 142 | 8E | SS2 | 228 | E4 | ä | ||
| 57 | 39 | 9 | 143 | 8F | SS3 | 229 | E5 | å | ||
| 58 | 3A | : | 144 | 90 | DCS | 230 | E6 | æ | ||
| 59 | 3B | ; | 145 | 91 | PU1 | 231 | E7 | ç | ||
| 60 | 3C | < | 146 | 92 | PU2 | 232 | E8 | è | ||
| 61 | 3D | = | 147 | 93 | STS | 233 | E9 | é | ||
| 62 | 3E | > | 148 | 94 | CCH | 234 | EA | ê | ||
| 63 | 3F | ? | 149 | 95 | MW | 235 | EB | ë | ||
| 64 | 40 | @ | 150 | 96 | SPA | 236 | EC | ì | ||
| 65 | 41 | A | 151 | 97 | EPA | 237 | ED | í | ||
| 66 | 42 | B | 152 | 98 | SOS | 238 | EE | î | ||
| 67 | 43 | C | 153 | 99 | SGCI | 239 | EF | ï | ||
| 68 | 44 | D | 154 | 9A | SCI | 240 | F0 | ð | ||
| 69 | 45 | E | 155 | 9B | CSI | 241 | F1 | ñ | ||
| 70 | 46 | F | 156 | 9C | ST | 242 | F2 | ò | ||
| 71 | 47 | G | 157 | 9D | OSC | 243 | F3 | ó | ||
| 72 | 48 | H | 158 | 9E | PM | 244 | F4 | ô | ||
| 73 | 49 | I | 159 | 9F | APC | 245 | F5 | õ | ||
| 74 | 4A | J | 160 | A0 | NBSP | 246 | F6 | ö | ||
| 75 | 4B | K | 161 | A1 | ¡ | 247 | F7 | ÷ | ||
| 76 | 4C | L | 162 | A2 | ¢ | 248 | F8 | ø | ||
| 77 | 4D | M | 163 | A3 | £ | 249 | F9 | ù | ||
| 78 | 4E | N | 164 | A4 | ¤ | 250 | FA | ú | ||
| 79 | 4F | O | 165 | A5 | ¥ | 251 | FB | û | ||
| 80 | 50 | P | 166 | A6 | ¦ | 252 | FC | ü | ||
| 81 | 51 | Q | 167 | A7 | § | 253 | FD | ý | ||
| 82 | 52 | R | 168 | A8 | ¨ | 254 | FE | þ | ||
| 83 | 53 | S | 169 | A9 | © | 255 | FF | ÿ | ||
| 84 | 54 | T | 170 | AA | ª | |||||
| 85 | 55 | U | 171 | AB | « |
Converting a Whole ASCII String into HEX
Now let us move from single characters to complete words. Suppose we want to convert the word $CAT$ into HEX. We must work one character at a time.
The character $C$ has ASCII decimal $67$, which becomes HEX $43$. The character $A$ has ASCII decimal $65$, which becomes HEX $41$. The character $T$ has ASCII decimal $84$, which becomes HEX $54$.
So the word becomes:
$CAT \rightarrow 43\ 41\ 54$
Now let us try $BOOK$. The character $B$ becomes $42$, $O$ becomes $4F$, the next $O$ becomes $4F$ again, and $K$ becomes $4B$. So:
$BOOK \rightarrow 42\ 4F\ 4F\ 4B$
