Hongmu Notes

🅾️ Text to binary

Convert the entire text into 0 and 1 character by character, each character is a group, and the groups are separated by spaces.

Text to binary

Instructions for use

Paste the text into the upper input box and click "Convert": each character will output a group of 0 and 1 according to its code point, with a space separating the groups, and the result will appear in the lower result box. The number of digits is not fixed - 7 to 8 digits for English and punctuation, more than 15 digits for commonly used Chinese characters, and maybe 17 digits for emoticons; spaces will be converted into 100000, and line breaks into 1010, so the blanks and line breaks in the original text can be seen from the results. The output does not perform zero padding and does not split surrogate pairs. It is consistent with the "binary to text" caliber and can be restored and verified by each other. All conversions are completed locally in the browser and are not uploaded or retained.

✅ How to check the results

  • The number of groups should equal the number of characters (spaces and newlines also count as characters)
  • When the first character is H, the first group should be 1001000
  • Pasting the result into "Binary to Text" should restore the original text

🔒 Data and privacy

The conversion is completed locally in the browser, and the input and results are not uploaded or retained, and will be cleared when the page is refreshed. The binary result is not equal to encryption. Anyone can restore it in the same way. Please do not use it as a means of confidentiality.

Text encoded into binary

Line breaks and tabs in the original text will appear in the results. This is a feature and something you should pay attention to.

📌 Whitespace characters will be converted

When copying text from a web page or document, invisible characters are often included: line breaks, tabs, trailing spaces, and full-width spaces. This tool does not ignore them and converts them according to code points, so the groups 1010 (line feed), 1001 (tab character), and 100000 (space) will appear in the result. The advantage is that "what you see is what you get" - you can infer the formatting of the original text from the results; the cost is that if the target is just "a line of constants", you need to clean up the original text before converting.

invisible charactersbinarySource
newline1010Line feed character in carriage return and line feed
tab character1001Table copy is often brought in
Half-width space100000Normal spaces
full width space11000000000000Spaces under Chinese input method

🧭 Do you want to clean up the original text first?

Depends on the purpose: to check "what is in the original text", convert directly; to generate clean binary constants, first merge the original text into one line and remove the leading and trailing blanks, and then convert.

All keywords and tutorials 12

❓ FAQ

What is 1001 in the result?
That's the tab character; it's often included when copying text from tables or code.
How to distinguish between full-width spaces
The full-width space code point is larger (12288), and the output is 10000000000000, which is significantly different from the 100000 of half-width space.
Will line breaks be converted?
Yes, line breaks will be converted to 1010; if you don’t want line breaks to enter the result, merge the text into one line first and then convert.