HCODX/Text to Hex
100% browser-based · UTF-8 encoded · Per-byte hex output

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.

Plain text
Hex bytes
Convert options
Reverse (Hex → Text)
Input size
0 B
Output size
0 B
Byte count
Status
Ready
Example

Text in, hex out

Each byte of the UTF-8 encoding becomes two hex characters. ASCII characters are 1 byte; emoji can be 4.

Plain text
Hello
Hex bytes
48 65 6c 6c 6f
Use cases

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.

Step by step

How to convert text to hex

1

Paste your text

Any Unicode is fine; UTF-8 encoding is applied first.

2

Pick case / separator / grouping

Match your target format.

3

Toggle the 0x prefix

If your target language requires it.

4

Click Convert

Output appears on the right.

FAQ

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

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 0x prefix).
  • 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.
Related

Related tools