Binary to String Converter
Decode That Wall of 0s and 1s
- converted_txt
Binary is the "cryptography" that every puzzle starts with and every puzzle maker secretly hopes you don't immediately spot - a raw wall of 0s and 1s that's not a cipher at all, just bytes wearing a scary costume. Binary2String is the node that takes that wall and turns it back into readable text. If a clue in your ARG is a string like 01001000 01100101 01101100 01101100 01101111, this is the one-shot conversion that reveals "Hello."
The mechanism is exactly as simple as it should be: the node strips spaces and newlines, groups the remaining digits into 8-bit chunks, converts each chunk to a byte, and decodes the resulting byte string using the encoding_format you pick. That last step is the only place things can go wrong, because the same binary can decode to different text under UTF-8 versus UTF-16 versus Latin-1.
The inputs
text- the binary string, with or without spaces between groups.encoding_format- the dropdown:utf-8,utf-16,utf-32,ascii,latin-1,cp1252,utf-8-sig, orOther. UTF-8 is right for anything you'd actually encounter; the rest exist for legacy or non-UTF sources.other_encoding_format(optional) - pickOtherand type any Python codec name when your encoding isn't in the list.
Output is converted_txt (STRING).
Where people get burned
The node validates strictly, which is a feature but also the source of most errors. If your binary length isn't a multiple of 8, it raises an error - so a stray space or a missing digit will stop the whole thing. Clean the input first (the pack has string nodes for that). Second: the digits must be actual 0/1 characters; if your "binary" contains letters, it's not binary and the node says so. Third: encoding mismatch - decode UTF-16 bytes as UTF-8 and you get mojibake or a crash, not a helpful message.
The classic companion question is "what about 16-bit chunks?" - some puzzles hand out binary grouped in 16s. That's fine; the node groups by 8s because that's one byte per character for the common encodings. If you genuinely need 16-bit decoding, that's what utf-16 on the encoding side is for.
Installing it
Part of the ARG Toolkit pack:
cd ComfyUI/custom_nodes
git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
Restart and find it under ARG Toolkit → Utilities → Converter (ComfyUI Manager: search "ComfyUI ARG Toolkit"). Pure Python stdlib, no extra dependencies beyond the pack's own. Nothing heavy, no models.
Troubleshooting
- "must be a multiple of 8" → stray space or missing digit; clean the input.
- "must contain only 0 and 1" → the input has letters or symbols; it wasn't binary.
- Mojibake output → switch
encoding_format;latin-1andcp1252are the fallbacks for legacy text.
Binary2String is the boring-but-essential utility that every ARG toolkit needs, because the first clue is always binary. Five seconds of setup, and the message reads itself.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Hello World! | — |
| encoding_format | COMBO | The encoding format available for text, may yield different results when converting. | |
| other_encoding_formatopt | STRING | If, for some reason, your chosen encoding format is not available in the dropdown, select "Other" in encoding_format and type in your encoding format here. Supports all format written in Python's `encoding` module. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| converted_txt | STRING | — |