Hex to ASCII Converter

Converting Hexadecimal to ASCII

Hexadecimal is a base 16 numbering system, in which each digit of a number are represented by 16 possible characters. These chracters are 0-9 and A-F. Hexadecimal is widely used when representing binary numbers, as they can perfectly represent a byte using only two digits.

Computers need a way to represent text. A computer's representation of text is called an encoding. The simplest encoding is ASCII, in which it represents each character as a byte (8 digit binary number), and thus can encode up to 127 (255 in its extended form) different characters.

This makes hexadecimal a perfect representation of ASCII text, as the encoding calls for a single byte to be delegated for each character. By using a simple table, you can use hexadecimal to represent any ASCII character.

However, ASCII does not cover Unicode characters, which include emojis and other non-latin characters. UTF-8 was created for this reason, and is the most common encoding type used today, supporting over one million Unicode code points. UTF-8 is used by the converter here to convert binary to Unicode. Unfortunately, its encoding and decoding process is complex enough that it cannot be covered here, so we'll stick to the basic 127 ASCII characters.

Converting hexadecimal to ASCII:

  1. Each ASCII character is represented by one byte, so pad the hexadecimal string with zeroes so its length is a multiple of two.
  2. Split the hexadecimal string into chunks, with each chunk being two digits long and thus one byte.
  3. Working left to right, get the value of each hexadecimal byte using an ASCII table.
  4. Get the completed message.

Example

Converting 636f646516 to ASCII:

  1. The hexadecimal string is already the correct length.
  2. Split the string into byte chunks.
    • 6316 6f16 6416 6516
  3. Working left to right, decode using the table.
    • code

ASCII Table

ASCII CharacterHexadecimalBinaryDecimal
NUL00000000000
SOH01000000011
STX02000000102
ETX03000000113
EOT04000001004
ENQ05000001015
ACK06000001106
BEL07000001117
BS08000010008
HT09000010019
LF0A0000101010
VT0B0000101111
FF0C0000110012
CR0D0000110113
SO0E0000111014
SI0F0000111115
DLE100001000016
DC1110001000117
DC2120001001018
DC3130001001119
DC4140001010020
NAK150001010121
SYN160001011022
ETB170001011123
CAN180001100024
EM190001100125
SUB1A0001101026
ESC1B0001101127
FS1C0001110028
GS1D0001110129
RS1E0001111030
US1F0001111131
Space200010000032
!210010000133
"220010001034
#230010001135
$240010010036
%250010010137
&260010011038
'270010011139
(280010100040
)290010100141
*2A0010101042
+2B0010101143
,2C0010110044
-2D0010110145
.2E0010111046
/2F0010111147
0300011000048
1310011000149
2320011001050
3330011001151
4340011010052
5350011010153
6360011011054
7370011011155
8380011100056
9390011100157
:3A0011101058
;3B0011101159
<3C0011110060
=3D0011110161
>3E0011111062
?3F0011111163
@400100000064
A410100000165
B420100001066
C430100001167
D440100010068
E450100010169
F460100011070
G470100011171
H480100100072
I490100100173
J4A0100101074
K4B0100101175
L4C0100110076
M4D0100110177
N4E0100111078
O4F0100111179
P500101000080
Q510101000181
R520101001082
S530101001183
T540101010084
U550101010185
V560101011086
W570101011187
X580101100088
Y590101100189
Z5A0101101090
[5B0101101191
\5C0101110092
]5D0101110193
^5E0101111094
_5F0101111195
`600110000096
a610110000197
b620110001098
c630110001199
d6401100100100
e6501100101101
f6601100110102
g6701100111103
h6801101000104
i6901101001105
j6A01101010106
k6B01101011107
l6C01101100108
m6D01101101109
n6E01101110110
o6F01101111111
p7001110000112
q7101110001113
r7201110010114
s7301110011115
t7401110100116
u7501110101117
v7601110110118
w7701110111119
x7801111000120
y7901111001121
z7A01111010122
{7B01111011123
|7C01111100124
}7D01111101125
~7E01111110126
DEL7F01111111127