Hexadecimal to String Converter
Turn those hex scribbles back into readable text
- converted_txt
Half the messages in an ARG arrive as hex - 48656c6c6f20576f726c6421 doesn't look like anything until you decode it, and then it's "Hello World!". Hex2String is the node that does that conversion: paste the hex in, get the text out. It's the decode half of the pack's String2Hex pairing, and it's one of those tiny utility nodes you'll wire into every workflow that involves hidden text, because the output of ciphers and watermarks so often comes back as hex.
How it works
The mechanism is four operations in a row: strip any 0x prefixes, drop spaces, convert the hex pairs into bytes, then decode those bytes using your chosen character encoding. It's forgiving in the way a solver wants - 0x4865 0x6c6c and 48656c6c both decode fine - but it's not magical: the hex has to be well-formed, even-length, and decodable in the encoding you pick.
The inputs that matter
text- the hex string. Accepts0xprefixes and spaces, which covers the two most common ways hex gets pasted around.encoding_format- the character encoding. The dropdown hasutf-8,utf-16,utf-32,ascii,latin-1,cp1252,utf-8-sig, andOther. This is the input that bites people. Hex bytes are encoding-agnostic -48 65 6c 6c 6fis "Hello" in ASCII, UTF-8, and latin-1 alike, but a two-byte encoding likeutf-16reads the same bytes completely differently. If the text comes out as garbage, the encoding is the first thing to question.other_encoding_format- only used when you selectOther. Type any encoding name Python'scodecsmodule knows (e.g.shift_jis,utf-16-le).
The output
converted_txt(STRING) - the decoded text. Wire it into a text display node, aShow Text, or straight into the next cipher in the chain.
Installing it
Part of the ComfyUI ARG Toolkit:
cd ComfyUI/custom_nodes
git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
Restart ComfyUI, or install via ComfyUI Manager ("ComfyUI ARG Toolkit"). This node has no special dependencies - it's pure Python bytes.fromhex and decode().
Where people get burned
- Odd-length hex. Hex encodes bytes as pairs; a stray character leaves a dangling nibble and
bytes.fromhexthrows aValueError. Double-check you're not missing a leading zero. - Wrong encoding.
utf-8is the default and the right call 95% of the time. If output shows replacement characters or mojibake, the hex was probably produced with a different encoding - trylatin-1orcp1252, which decode almost any byte sequence without error. - Decoding non-text. Hex that came from a binary file or an encrypted blob often isn't valid text in any encoding. If decoding keeps failing, the bytes may not be a message at all - yet.
The underrated strength here is the Other escape hatch. When a puzzle intentionally uses an obscure encoding, this node is the only one in the pack that lets you throw any Python codec at the bytes. For the "text that was hex all along" moment, this is the node that ends the mystery.
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 | — |