UTF8 Encode
Encode text to its raw UTF-8 bytes, live as you type, shown as hex or decimal.
Encodes live as you type using TextEncoder, correctly handling multi-byte characters like emoji. Runs entirely in your browser.
Need the opposite? UTF8 Decode
What is UTF8 Encode?
Type text and see its exact UTF-8 byte representation, in hex or decimal. Useful for understanding how multi-byte characters like emoji are actually stored, or debugging a byte-level encoding issue. Helpful when a string's byte length doesn't match its character count, a common source of confusion in APIs or storage limits that count bytes rather than characters. Encoding happens live as you type, entirely in your browser.
How to Use the UTF-8 Encoder
- 1
Type or Paste Text: Enter any text, including accented letters, symbols, or emoji.
- 2
Choose Hex or Decimal: Pick whichever byte format you need for your use case.
- 3
Read the Byte Output Instantly: The exact UTF-8 bytes appear automatically as you type.
- 4
Copy the Result: Use the copy button to copy the byte sequence for debugging or documentation.
How UTF-8 Encoding Works
UTF-8 stores each Unicode character as 1 to 4 bytes, chosen based on the character's code point. Code points 0-127 (standard ASCII) use exactly 1 byte, identical to plain ASCII. Higher code points need more bytes: most accented Latin letters and symbols use 2, most common CJK characters use 3, and characters outside the Basic Multilingual Plane, including most emoji, use 4. A string's byte length can end up larger than its character count once any non-ASCII characters are involved, which is a common source of confusion in APIs or storage systems that enforce limits by byte count rather than character count.
Example
The text café encodes to the byte sequence 63 61 66 c3 a9 in hex (99, 97, 102, 195, 169 in decimal): 5 bytes for 4 characters, since é takes 2 bytes while c, a, and f each take 1.
An emoji like 😀 encodes to 4 bytes: f0 9f 98 80 in hex, the maximum UTF-8 allows for a single character.Frequently Asked Questions
Common questions about UTF8 Encode.