Bytelify

UTF8 Encode

Encode text to its raw UTF-8 bytes, live as you type, shown as hex or decimal.

Runs in your browser, nothing sent
utf8-encode
21 bytes
48 65 6c 6c 6f 2c 20 42 79 74 65 6c 69 66 79 21 20 f0 9f 91 8b

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. 1

    Type or Paste Text: Enter any text, including accented letters, symbols, or emoji.

  2. 2

    Choose Hex or Decimal: Pick whichever byte format you need for your use case.

  3. 3

    Read the Byte Output Instantly: The exact UTF-8 bytes appear automatically as you type.

  4. 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

OUTPUT
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.
FAQs

Frequently Asked Questions

Common questions about UTF8 Encode.

Most emoji take 4 bytes in UTF-8, versus 1 byte for plain ASCII characters. You can see this directly in the byte count and output here.

Yes, use UTF8 Decode, which takes the same hex or decimal byte format and reverses the process.

No. Unicode is the character standard that assigns a code point number to every character. UTF-8 is one specific way of encoding those code points as bytes; UTF-16 and UTF-32 are other valid encodings of the same Unicode standard.

UTF-8 encodes code points 0-127 as a single byte identical to plain 7-bit ASCII, so any valid ASCII text is also valid UTF-8 text with no conversion needed.

Yes, Bytelify's UTF-8 Encoder is free with no account or sign-up required.

No. The encoding runs entirely client-side in your browser using TextEncoder, so nothing you type is sent anywhere.