Hongmu Notes

🗄️ Convert string to binary

Enter a piece of text and get a binary string of 8 bits each.

Convert string to binary

Instructions for use

  • Encoded according to UTF-8: 1 byte for English numbers, 3 bytes for Chinese characters, 4 bytes for emoticons
  • Output a continuous 8-digit fixed-length string, which can be restored by pasting it back into "Binary to String"
  • All is done locally in the browser, and the input content will not be uploaded.

Convert string to 8-bit binary

"8-bit fixed length" is the most practical format for converting text to binary: each byte has a fixed 8 bits, and the combined length must be a multiple of 8. Any tool that parses by bytes can correctly restore it.

📌 Coding rules

  • The text is first encoded into a byte sequence according to UTF-8
  • Each byte outputs 8-bit binary, continuous concatenation, no spaces between groups.
  • In actual measurement, Hi gets 16 digits and Welcome gets 56 digits.

⚙️ Differences from other binary formats

This site also provides "text to binary" that converts character code points and outputs space-delimited text. The output formats of the two are different: this page is a continuous fixed-length string, suitable for byte-by-byte parsing scenarios; the other is more suitable for manual reading and character-by-character verification.

🧭 How to use the results

Copy the entire paragraph to the "Binary to String" tool to restore the original text, or paste it into a program or configuration that requires byte sequences; the number of digits will expand to more than 8 times the original number of characters, so pay attention to the length limit when pasting.

📌 Why emphasize "8-bit"

Because fixed length is the whole value of this format: the parser can get the bytes by just splitting them by 8 bits, no additional rules are needed. If the number of digits is not a multiple of 8, it means that the data has lost characters during transmission or copying, and the verification can detect it immediately.

All keywords and tutorials 12

❓ FAQ

why not 7 bits
Although the effective bits of ASCII are 7 bits, storage and transmission are generally aligned on 8 bits (the highest bit is filled with 0). After unifying 8 bits, the length is constant, and no additional judgment is required on the parsing end.
Are there delimiters in the results?
No. The output is continuous 0s and 1s. When you need to view them in groups, you can segment the sentences by yourself for every 8 bits, or stick to "Binary to String" to restore to text comparison.
why every group of 8 bits
8 bits are exactly one byte, and the essence of converting text to binary is to "write the byte sequence as 0 and 1." After fixed-length grouping, the length is always a multiple of 8, making it easier to restore.