Code and data guides

Decode a UTF-8 Message from Binary

·

A sequence of bits needs a grouping width and an encoding. One 8-bit group represents one UTF-8 byte. A single visible character may use multiple bytes.

Binary to Text Converter

Decode the nine-byte practice message

Select Binary to text and 8-bit UTF-8, then choose Load sample. The input contains nine 8-bit groups, and the output is Café ☕.

The H in ASCII takes one byte. In this example, é takes bytes C3 and A9, and ☕ takes E2, 98 and 95. Compare the group count with the payload byte count before downloading.

Decode the nine-byte practice message
MeaningHex bytesBinary groups
C4301000011
éC3 A911000011 10101001
☕E2 98 9511100010 10011000 10010101

Open Binary to Text ConverterRFC 3629 UTF-8 encoding

Swap the result back to binary

Choose Swap and select Comma under Output separator. The binary output has the same bits in the same order and commas between byte groups. Download binary-output.txt to keep that representation.

Use None to join the groups. The decoder can divide the continuous run into groups again when the selected width fits its length.

Open Binary to Text ConverterRFC 3629 UTF-8 encoding

Compare a seven-bit ASCII message

Switch to Binary to text and select 7-bit ASCII. Load the sample to decode Hi from 1001000 and 1101001. Remove one bit from a group to see the width error.

If an 8-bit run produces invalid UTF-8 bytes, check the encoding used by the sender before reading the result as text.

RFC 20 ASCII seven-bit values for network interchangeRFC 3629 UTF-8 encoding

Common questions

Can the decoder accept commas and new lines?

Yes. Commas, spaces, tabs and new lines can separate whole 7-bit or 8-bit groups.

Can I save decoded Unicode text?

Download output saves the decoded text as UTF-8 in a .txt file.

Sources

Put it into practice.

Related guides