Home » Binary Converter Tools » 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
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.
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.
| Input | Output |
|---|---|
| A in text | 41 in hex |
| Hi in text | 4869 in hex |
| Hello in text | 48656C6C6F in hex |
| 123 in text | 313233 in hex |
| a in text | 61 in hex |
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.
Yes, it is completely free with no sign up.
Yes. Switch the direction to hex to text and enter a hex string with an even number of hex digits.
You get a plain error message and no output, because hex bytes always come in pairs of digits.
No. All conversion happens in your browser on your own device, so your text never leaves your computer.
A is 65 in decimal, which is 41 in hex. Lowercase a is 97 in decimal, which is 61 in hex.
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.
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.
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.
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.
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.
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.
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.
| Character | Decimal | Hex |
|---|---|---|
space | 32 | 20 |
! | 33 | 21 |
" | 34 | 22 |
# | 35 | 23 |
$ | 36 | 24 |
% | 37 | 25 |
& | 38 | 26 |
' | 39 | 27 |
( | 40 | 28 |
) | 41 | 29 |
* | 42 | 2A |
+ | 43 | 2B |
, | 44 | 2C |
- | 45 | 2D |
. | 46 | 2E |
/ | 47 | 2F |
0 | 48 | 30 |
1 | 49 | 31 |
2 | 50 | 32 |
3 | 51 | 33 |
4 | 52 | 34 |
5 | 53 | 35 |
6 | 54 | 36 |
7 | 55 | 37 |
8 | 56 | 38 |
9 | 57 | 39 |
: | 58 | 3A |
; | 59 | 3B |
< | 60 | 3C |
= | 61 | 3D |
> | 62 | 3E |
? | 63 | 3F |
@ | 64 | 40 |
A | 65 | 41 |
B | 66 | 42 |
C | 67 | 43 |
D | 68 | 44 |
E | 69 | 45 |
F | 70 | 46 |
G | 71 | 47 |
H | 72 | 48 |
I | 73 | 49 |
J | 74 | 4A |
K | 75 | 4B |
L | 76 | 4C |
M | 77 | 4D |
N | 78 | 4E |
O | 79 | 4F |
P | 80 | 50 |
Q | 81 | 51 |
R | 82 | 52 |
S | 83 | 53 |
T | 84 | 54 |
U | 85 | 55 |
V | 86 | 56 |
W | 87 | 57 |
X | 88 | 58 |
Y | 89 | 59 |
Z | 90 | 5A |
[ | 91 | 5B |
\ | 92 | 5C |
] | 93 | 5D |
^ | 94 | 5E |
_ | 95 | 5F |
` | 96 | 60 |
a | 97 | 61 |
b | 98 | 62 |
c | 99 | 63 |
d | 100 | 64 |
e | 101 | 65 |
f | 102 | 66 |
g | 103 | 67 |
h | 104 | 68 |
i | 105 | 69 |
j | 106 | 6A |
k | 107 | 6B |
l | 108 | 6C |
m | 109 | 6D |
n | 110 | 6E |
o | 111 | 6F |
p | 112 | 70 |
q | 113 | 71 |
r | 114 | 72 |
s | 115 | 73 |
t | 116 | 74 |
u | 117 | 75 |
v | 118 | 76 |
w | 119 | 77 |
x | 120 | 78 |
y | 121 | 79 |
z | 122 | 7A |
{ | 123 | 7B |
| | 124 | 7C |
} | 125 | 7D |
~ | 126 | 7E |
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.
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.
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.