How to use Hex Encoder
- Paste the text.
- Choose the encoding and the output format.
- Set bytes per line for hex-dump style output.
- Copy the hex.
Hex Encoder features
- UTF-8, UTF-16 LE/BE or Latin-1 byte encoding
- Continuous, space-, colon-, 0x-prefixed, percent-encoded or C array formats
- Lowercase or uppercase digits; optional bytes-per-line wrapping
- Warns when Latin-1 cannot represent a character
- Live output with byte counts
Hex Encoder example
Hex of an emoji in UTF-8
Input:
🚀Output:
f0 9f 9a 80Frequently asked questions about Hex Encoder
Why does "é" become two bytes?
In UTF-8, characters outside ASCII take 2–4 bytes (é = C3 A9, 🚀 = F0 9F 9A 80). Choose UTF-16 to see 2-byte code units or Latin-1 for single bytes (only for characters up to U+00FF).
What is the C array format for?
It produces "const unsigned char data[N] = { 0x48, … };" that you can paste straight into C/C++ source for embedded strings and test fixtures.
Uppercase or lowercase?
Both mean the same. Lowercase is conventional in most languages and tools; some specifications (e.g. percent-encoding, MAC addresses) prefer uppercase.
What is UTF-16 LE vs BE?
The byte order of each 16-bit unit. Windows APIs and .NET use little-endian (LE); network protocols and Java often use big-endian (BE). "A" is 41 00 in LE and 00 41 in BE.
Technical notes
Each byte of the encoded text becomes two hexadecimal digits. UTF-8 is variable-length (1–4 bytes per character); UTF-16 uses 2 bytes per code unit with the chosen byte order; Latin-1 uses one byte and replaces unrepresentable characters with "?" (0x3F).