UTF-8 Converter

Free online UTF-8 encoder and decoder. See the raw byte representation of any text in UTF-8. Decode hex bytes back to readable characters. UTF-8 debugging made easy.

Text
UTF-8 Bytes (Hex)
 

How to Use UTF-8 Converter

1

Enter Your Text

Type or paste text into the input panel. You can enter regular text to see its UTF-8 byte representation, or paste hex bytes to decode back to text.

2

Choose Direction

Click "Encode to UTF-8 Bytes" to see the raw byte sequence for your text, or "Decode from Bytes" to convert hex bytes back to readable text.

3

Inspect and Use

Each byte is shown in hex. For multi-byte characters (like Chinese or emoji), you can see exactly which bytes make up each character — useful for debugging encoding issues.

Examples

Text

Hello 世界 🌍

UTF-8 Bytes

48 65 6C 6C 6F 20 E4 B8 96 E7 95 8C 20 F0 9F 8C 8D

Frequently Asked Questions

What is UTF-8?

UTF-8 is a variable-length character encoding for Unicode. It uses 1 byte for ASCII characters (0-127), 2 bytes for most Latin-script extensions, 3 bytes for most CJK characters, and 4 bytes for emoji and rare characters. It's backward-compatible with ASCII and is the dominant encoding on the web (used by over 98% of websites).

How can I tell how many bytes a character uses in UTF-8?

Look at the first byte: if it starts with 0 (0x00-0x7F), it's a 1-byte ASCII char. If it starts with 110 (0xC0-0xDF), it's the first of 2 bytes. If it starts with 1110 (0xE0-0xEF), 3 bytes. If it starts with 11110 (0xF0-0xF7), 4 bytes. Continuation bytes always start with 10 (0x80-0xBF).

When would I need to inspect UTF-8 bytes?

UTF-8 byte inspection helps when: debugging character encoding bugs (garbled text, mojibake), validating that a system handles multi-byte characters correctly, working with binary file formats that store text as UTF-8, and understanding why a string's byte length differs from its character count.

Understanding UTF-8 Encoding

UTF-8 is brilliantly designed. ASCII characters (the most common on the web) use exactly one byte — identical to their ASCII representation. This means every ASCII document is automatically valid UTF-8. For characters beyond ASCII, UTF-8 uses a leading byte that indicates how many bytes follow, with continuation bytes that can't be confused with the start of a new character.

Byte Patterns

  • 1 byte: 0xxxxxxx (U+0000 to U+007F) — ASCII
  • 2 bytes: 110xxxxx 10xxxxxx (U+0080 to U+07FF) — Latin extensions, Greek, Arabic
  • 3 bytes: 1110xxxx 10xxxxxx 10xxxxxx (U+0800 to U+FFFF) — CJK, Hindi, most common scripts
  • 4 bytes: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx (U+10000+) — Emoji, rare characters

Related Articles