Text to Hex Converter
Convert text to hexadecimal and hex back to text, in UTF-8, UTF-16 or Latin-1, with a choice of separators and letter case.
Type in either box: text turns into hex as you type, and hex turns back into text.
More Byte Array Tools
View all 17ASCII characters are one byte in UTF-8, but accented letters, symbols and emoji take two to four - so the hex is longer than the text.
What Is the Text to Hex Converter?
It converts text into hexadecimal - two hex digits for every byte of the text - and converts hex back into text. Type in either box and the other updates. You can choose UTF-8, UTF-16 or Latin-1, the separator between bytes and upper or lower case.
When to Use It
- Checking exactly which bytes a string contains, including invisible characters.
- Reading hex from a log, a URL, a database dump or a protocol trace.
- Preparing hex for a test, a command-line tool or a hardware device.
How to Use It
- Type text in the left box to get hex, or paste hex in the right box to get text.
- Choose the encoding, separator and case.
- Copy the hex with the Copy button.
Example
Byteary: bytes made easy ✓ with a colon separator becomes 42:79:74:65:61:72:79:3A:20:62:79:74:65:73:20:6D:61:64:65:20:65:61:73:79:20:E2:9C:93. Every letter is one byte, but the check mark takes three: E2 9C 93. Going the other way, 48 69 21 is Hi!.
Understanding the Output
For plain English text, UTF-8, Latin-1 and ASCII give the same hex. The difference appears with accented letters, other scripts and emoji. In UTF-16 every character takes at least two bytes, so the hex is twice as long.
Limitations
If the hex is not valid in the chosen encoding, the text shows � characters. For code arrays instead of a hex string, use the String to Byte Array Converter; for percent-encoding in URLs, use the URL Encoder / Decoder.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.