Text to Hex
Convert text to a hexadecimal byte sequence in your browser. Text is encoded as UTF-8 first, then each byte becomes a 2-character hex value. Uppercase / lowercase, optional 0x prefix, and several separator styles.
Text in, hex out
Each byte of the UTF-8 encoding becomes two hex characters. ASCII characters are 1 byte; emoji can be 4.
Hello
48 65 6c 6c 6f
What you'll use this for
Hex is the universal byte-level language for embedded code, debugging, and protocol design.
Embedded systems
Generate hex byte arrays for C / Arduino sketches.
Debugging encoding
See the exact UTF-8 byte sequence for a string.
Wire protocols
Inspect bytes of a payload as hex for protocol design.
Cryptography
Convert plaintext to bytes for hashing or HMAC input.
How to convert text to hex
Paste your text
Any Unicode is fine; UTF-8 encoding is applied first.
Pick case / separator / grouping
Match your target format.
Toggle the 0x prefix
If your target language requires it.
Click Convert
Output appears on the right.
Frequently asked questions
Byte-level. Each character is first encoded as UTF-8, then each byte becomes two hex chars. An ASCII letter is 1 byte (2 hex chars); an emoji can be 4 bytes (8 hex chars).
Both. Toggle under Case.
Yes. No signup, no limits, no ads.
If you want code points instead of UTF-8 bytes, use the Text to ASCII tool. The character é is one code point but two UTF-8 bytes.
Set Separator to ,, Case to UPPER, prefix on — output looks like 0x48, 0x65, ....
About this converter
Hex (hexadecimal) is base 16 — each byte renders as two characters from 0-9 and a-f. It's the standard wire-format for byte arrays in programming and debugging.
What it does
- UTF-8 encode the input string.
- Render each byte as two hex characters (with optional
0xprefix). - Customize separator, grouping, and case.
Notes
- Bytes, not code points. For code points use the Text to ASCII tool.
- BOM — the UTF-8 BOM (
EF BB BF) is not added. If you need it, prepend manually. - Endianness — irrelevant for UTF-8; bytes go in input order.