Skip to content
Test versionSearch

Developer tools

Strict UTF-8 binary text codec

Convert text to binary as eight-bit UTF-8 byte groups, or decode complete binary bytes back to text with strict UTF-8 error checking.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

Each character becomes its UTF-8 bytes written as 8 bits, for example A = 01000001 and é = 11000011 10101001. To decode, enter the bits without gaps or as whole bytes separated by spaces or underscores. This converts text, not numbers: 1011 as a number (11) needs a number base converter. Text to encode may have up to 400 characters, text to decode up to 500; a result longer than 500 characters is refused. Control characters are not accepted. You can also load a one-line UTF-8 file of up to 32 KiB. Downloads: TXT, CSV (lines that look like formulas are protected for spreadsheets), JSON and printable HTML. Nothing is saved or sent automatically.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Text is converted with the browser’s standard functions (UTF-8 encoder, JSON, String.normalize) or the RFC 4648 Base32 alphabet. Each direction is checked strictly, so invalid input is refused instead of guessed. Each character becomes its UTF-8 bytes written as 8 bits, for example A = 01000001 and é = 11000011 10101001. To decode, enter the bits without gaps or as whole bytes separated by spaces or underscores. This converts text, not numbers: 1011 as a number (11) needs a number base converter. Text to encode may have up to 400 characters, text to decode up to 500; a result longer than 500 characters is refused. Control characters are not accepted. You can also load a one-line UTF-8 file of up to 32 KiB. Downloads: TXT, CSV (lines that look like formulas are protected for spreadsheets), JSON and printable HTML. Nothing is saved or sent automatically.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Direction
Encode
Encoded byte layout
Space between bytes
Text or complete binary bytes
Own ä🚀

Result

Encoded result
01001111 01110111 01101110 00100000 11000011 10100100 11110000 10011111 10011010 10000000
Byte count
10
Result code points
6

Frequently asked questions

How do I convert text to binary?

Choose encode, enter your text and calculate. The strict UTF-8 binary codec writes each UTF-8 byte as an eight-bit group, so Own ä🚀 becomes 10 bytes for 6 code points.

How do I convert binary back to text?

Choose decode and enter complete bytes, either as compact bits or as whole byte groups separated by spaces or underscores. Decoding is strict, so invalid UTF-8 causes an error instead of a guess.

Why does an accented letter or emoji take several bytes in binary?

The codec encodes text as UTF-8, where characters outside basic ASCII use more than one byte. In the example, ä takes two bytes and the rocket emoji four bytes.

How much text can the binary text codec handle?

Text to encode can have at most 400 UTF-16 units, and binary to decode at most 500 units. Each output is limited to 500 characters, and control characters or unpaired surrogates are refused.

Does the binary codec detect the direction automatically?

No. You choose encode or decode explicitly. There is no automatic direction, ASCII table or multiline or tab separator support, and a BOM is preserved.

Is converting text to binary a form of encryption?

No. It is text encoding only, not integer calculation or encryption.