Home » Binary Converter Tools » Text to Hex Converter

Text to Hex Converter

Convert text to hex and hex back to text in one tool, with a direction switch and a step for every character.

Last updated 13 November 2026

Input0 chars
Output0 chars

Everything runs in your browser, so your value never leaves your device. Whole numbers only for number base conversions.

A text to hex converter turns ordinary text into hex code, and this page also decodes hex back to text. Hex encoding turns every character into a short code made of digits and letters from A to F, and it is used in programming, data files and web work, where text must be stored or sent as bytes.

Each character has a number, called its code. For example, H is 72 in decimal, which is 48 in hex, and i is 105 in decimal, which is 69 in hex. Joining those codes gives 4869 for the word Hi. This tool does that joining for a full word or sentence, and it can also split a hex string back into characters.

Everything runs in your browser, so your text never leaves your device. The tool works with plain English text and with hex strings that have an even number of digits, and it gives a plain error for odd length or invalid hex instead of a wrong answer.

Worked example: text Hi to hex, and back

Find the code for each character: H is 72, and i is 105.

Convert each code to hex: 72 is 48, and 105 is 69.

Join the codes in order: 4869. So Hi in text is 4869 in hex.

To decode, split 4869 into pairs, 48 and 69, convert each pair back to a code, 72 and 105, and read the characters: Hi.

How to Use This Tool

  1. Choose a direction, text to hex or hex to text.
  2. Enter your text or hex code in the input box.
  3. Press Convert to see the result at once.
  4. Copy the result or download it as a text file.

Why Use This Tool

Common Values

InputOutput
A in text41 in hex
Hi in text4869 in hex
Hello in text48656C6C6F in hex
123 in text313233 in hex
a in text61 in hex

Related Conversions

If you need a different direction, try the Text to Binary Converter, Text to ASCII Converter, Hex to Decimal Converter and Decimal to Hex Converter. Each one works the same way, in your browser, with the steps shown so you can check the answer.

Frequently Asked Questions

Is the Text to Hex Converter free to use?

Yes, it is completely free with no sign up.

Can it decode hex back to text?

Yes. Switch the direction to hex to text and enter a hex string with an even number of hex digits.

What if my hex string has an odd number of digits?

You get a plain error message and no output, because hex bytes always come in pairs of digits.

Is my text uploaded to a server?

No. All conversion happens in your browser on your own device, so your text never leaves your computer.

What is the hex value of A?

A is 65 in decimal, which is 41 in hex. Lowercase a is 97 in decimal, which is 61 in hex.

Does this tool work with emoji?

Yes. Emoji and other characters outside basic English work, because the tool encodes text with UTF 8. An emoji needs four bytes, so 😀 becomes F09F9880, while a letter like é needs two bytes and becomes C3A9.

Does the output use spaces between hex values?

No. The output is compact hex with no spaces, so Hi becomes 4869, not 48 69. There is no spaced output option on this page.

Can I add a 0x prefix to the output?

No. There is no 0x prefix option on this page, so the output is plain hex digits only. If you need the prefix for code, add it yourself after copying.

What is the difference between text to hex and text to binary?

Text to hex gives two hex digits per byte, while text to binary gives eight bits per character. Hi becomes 4869 in hex and 01001000 01101001 in binary. Use the Text to Binary Converter if you need the binary form.

Is hex encryption?

No. Hex is an encoding, not encryption. Anyone can decode hex back to text, so never use it to hide a password or other secret.

What Is Hex and Why Two Digits per Byte

Hex, short for hexadecimal, is a number system with base 16. It uses the digits 0 to 9 and the letters A to F, where A stands for 10, B for 11, C for 12, D for 13, E for 14 and F for 15. One hex digit holds exactly four bits, and one byte holds eight bits, so every byte needs exactly two hex digits. That is why the letter A, which is 65 in decimal, becomes 41 in hex, and why the word Hi becomes 4869: H is 48 and i is 69. A single hex digit can never stand alone as a byte, and a hex string always has an even number of digits, because each byte is a pair.

ASCII to Hex Reference Table

The table below lists every printable ASCII character, from the space at code 32 to the tilde at code 126, with its decimal code and its hex code. Use it to check a conversion by hand or to look up a single character without running the tool.

CharacterDecimalHex
space3220
!3321
"3422
#3523
$3624
%3725
&3826
'3927
(4028
)4129
*422A
+432B
,442C
-452D
.462E
/472F
04830
14931
25032
35133
45234
55335
65436
75537
85638
95739
:583A
;593B
<603C
=613D
>623E
?633F
@6440
A6541
B6642
C6743
D6844
E6945
F7046
G7147
H7248
I7349
J744A
K754B
L764C
M774D
N784E
O794F
P8050
Q8151
R8252
S8353
T8454
U8555
V8656
W8757
X8858
Y8959
Z905A
[915B
\925C
]935D
^945E
_955F
`9660
a9761
b9862
c9963
d10064
e10165
f10266
g10367
h10468
i10569
j1066A
k1076B
l1086C
m1096D
n1106E
o1116F
p11270
q11371
r11472
s11573
t11674
u11775
v11876
w11977
x12078
y12179
z1227A
{1237B
|1247C
}1257D
~1267E

Characters That Need More Than One Byte

Basic English letters, digits and punctuation each fit in one byte, so each one becomes exactly two hex digits. Characters outside that basic set need more bytes under UTF 8, the encoding this tool uses. The letter é needs two bytes and becomes C3A9. The Chinese character 中 needs three bytes and becomes E4B8AD. The emoji 😀 needs four bytes and becomes F09F9880. The tool handles all of these correctly, because it encodes text with UTF 8 and decodes hex back the same way, and it still shows a step for every character you enter.

Where Hex Encoding Is Used

Hex shows up wherever bytes need to be written as readable text. Programmers read hex when they debug data, because a byte like 41 is easier to spot than a raw byte. Web addresses use hex after a percent sign, so a space in a link becomes %20. File hashes are written in hex, which is how a checksum can be copied and compared as plain text. Colour codes on the web are hex too: #FF5733 means red 255, green 87 and blue 51. In each case hex is a way to write bytes as text, not a way to hide them.

Text to Hex in Code

If you convert text in code instead of a tool, the shortest route in Python is one line: "Hi".encode().hex() gives '4869'. In JavaScript the same idea is [...'Hi'].map(c => c.charCodeAt(0).toString(16)).join(''), which also gives '4869'. For characters outside basic English, the Python line still gives the correct UTF 8 bytes, while the JavaScript line above works on single code units, so for emoji and other characters above the basic set, use TextEncoder in JavaScript instead.

Hex sits in a family of number conversions on this site. To turn hex back into a plain number, use the Hex to Decimal Converter, the Hex to Binary Converter or the Hex to Octal Converter. To go from a number to hex, use the Decimal to Hex Converter, the Binary to Hex Converter or the Octal to Hex Converter. To move between other bases, use the Binary to Decimal Converter, the Decimal to Binary Converter, the Binary to Octal Converter, the Decimal to Octal Converter, the Octal to Binary Converter or the Octal to Decimal Converter. And to turn text into a different code, use the Text to Binary Converter or the Text to ASCII Converter.

↑