UTF-8 Encode / Decode

Convert between text and UTF-8 hex bytes

How to use

Convert between text and UTF-8 hex bytes. Steps:

  1. Enter text in the Input box.
  2. Click To Hex to get space-separated uppercase bytes.
  3. Click To Text to restore hex back to text.
  4. Hex may contain spaces or newlines; non-hex characters are ignored.

Tip: paste the hex back into the input to compare the two byte rows and spot differences.

FAQ

Why is a Chinese character 3 bytes?

UTF-8 is a variable-length encoding: ASCII takes 1 byte, common Chinese characters take 3 bytes, and most emoji take 4 bytes.