Hongmu Notes

💾 Binary to string

Paste the continuous 8-digit binary string and restore it to text with one click.

Binary to string

Instructions for use

  • Every 8 bits correspond to a byte, and the number of bits must be a multiple of 8
  • Can contain spaces and line breaks. After pasting, the spaces will be automatically removed and then split.
  • Decode the byte sequence according to UTF-8, and both English numbers and Chinese can be restored

8-bit binary decoding

The difficulty in decoding is often not in the algorithm but in the verification: if there is one less digit and a letter is mixed in, the result will be an overall misalignment. The tool stops both types of problems in advance and tells you where the problem is.

📌 Two types of verification

situationTips
Contains characters other than 0/1The Nth bit contains characters other than 0 and 1
Number of digits is not a multiple of 8There are still N bits left, please make up.

⚙️ Actual measurement example

Entering 0100100a will prompt that the 8th digit is illegal; entering 0100100 (7 digits) will prompt that 1 digit is missing. In both cases, the result will be cleared to avoid giving erroneous characters.

🧭 Why not make fault-tolerant guesses

Automatically adding zeros or ignoring illegal characters may seem convenient, but it will produce results that appear correct but are misaligned, making troubleshooting more expensive. I would rather report an error than give an illusion.

📌 Long list of suggestions for handling

When there are more than a few thousand digits, it is recommended to try the first 16 digits first and confirm that the starting characters are as expected before converting the whole. In this way, even if there is a problem with the source data, it can be discovered in the shortest time.

📌 Three confirmations before decoding

Confirm that the number of digits is a multiple of 8, confirm that it only contains 0 and 1, and confirm that this data is indeed a byte-aligned fixed-length string. If all three items are correct, the decoding result is basically credible; if any item is inconsistent, the tool will give a clear prompt, and you can follow the prompts to return to the data source and make corrections.

All keywords and tutorials 12

❓ FAQ

Can I still continue after verification fails?
Yes. Just click the button again after correcting the input. The tool does not remember any state and converts independently each time.
Are underscores or commas ignored?
Only whitespace (spaces, newlines, tabs) are ignored. Underscores, commas and other symbols are illegal characters and will trigger prompts. It is recommended to remove them before converting.
Can binary with spaces be used?
Yes. The tool will remove all spaces and newlines before segmenting, so segmented binaries copied from documents or code can be used directly.