Text to Binary

Converter

Convert text to binary or back via UTF-8 encoding for ASCII and Unicode characters. Handy for low-level debugging, encoding tutorials and CTF puzzles.

5 bytes
Plain Text
5 chars
Binary (UTF-8)
40 bits·5 bytes

About Text to Binary

Breaking text into a string of 0s and 1s is something you do when teaching character encoding, inspecting serial data, or running a low-level programming demo. This tool converts text to and from binary bit strings locally in your browser, encoding every character by its actual UTF-8 bytes rather than a naive one-byte-per-character approach. That matters: a common Chinese character occupies 3 bytes (24 bits) and an emoji typically 4 bytes (32 bits). Output groups every 8 bits with a space for readability, and decoding ignores whitespace, so you can paste bit strings with or without grouping. Because UTF-8 is the Web's default character encoding, it faithfully preserves any script, symbol, or emoji. The usual failure is an off-by-one: decoding needs the total bit count to be a multiple of 8, so a truncated string errors out until you notice the missing bit. Everything runs on your machine and nothing is uploaded, so private text stays safe.

How to Use

  1. Open the Text to Binary tool
  2. Select the source and target formats
  3. Adjust the output options as needed
  4. Click the Convert button; results appear in real time
  5. Copy or export the result

Use Cases

  • Teaching demo — Show how a sentence becomes a 0/1 sequence to explain how computers store text.
  • Encoding check — Inspect a character's UTF-8 bytes to confirm the encoding is as expected.
  • Restore data — Convert a captured bit string back to text to read content from a device.
  • Protocol debug — Turn a test string into binary to compare the underlying bit sequence.
  • Fun steganography — Encode a short message as a 0/1 string for puzzles or playful sharing.
  • Bit-level debugging — Convert a byte sequence to binary to inspect individual bits when debugging a protocol buffer or serial packet.
  • CS fundamentals — Demonstrate UTF-8 encoding by showing how each character's code point maps to its binary representation.

FAQ

How many bits is one Chinese character?

Under UTF-8 a common Han character is 3 bytes, i.e. 24 bits. The tool emits bits matching each character's actual UTF-8 byte count, not a fixed one byte per character.

Do bit groups need spaces?

For readability it groups every 8 bits (one byte) with a space by default. On decoding it ignores spaces, so input works with or without them.

Must groups be 8 bits?

It works in bytes (8 bits). If the bit count is not a multiple of 8, decoding fails to align bytes and errors — check the bit string is complete.

Are emoji supported?

Yes. An emoji is usually 4 bytes in UTF-8, expanded to 32 bits and decoded back correctly.

How does this differ from text to Unicode?

This outputs byte-based 0/1 bits; to see each character's code point (like U+4F60), use our text to Unicode tool.

Why UTF-8 and not ASCII?

ASCII covers only 128 basic characters and cannot encode Chinese or emoji; UTF-8 is the default encoding of the Web and JSON, so the tool uses UTF-8 bytes to preserve any character.

Advertisement