Nodes/ComfyUI ARG Toolkit/String to Hexadecimal Converter
ComfyUI Node

String to Hexadecimal Converter

The format every ARG actually uses

By AzelusLightvale·Created 12 months ago·Updated 5 days ago· 1
String to Hexadecimal Converter
    • converted_txt
    textHello World!
    encoding_format
    other_encoding_format

    Between binary and base64, hex is the encoding ARG makers actually reach for. It's shorter than binary (two hex digits per byte instead of eight bits), it's unambiguous, and it's the native output format of every hash and most cipher tools - so hex strings are what a solver spends most of their time staring at. This node converts a string to hex so you can produce those strings inside ComfyUI.

    If you've used String2Base64 or String2Binary, you already know this node's shape: same converter family, one string in, one string out. The output Hello becomes 48656c6c6f.

    How it works

    • text - the string to convert.
    • encoding_format - utf-8, utf-16, utf-32, ascii, latin-1, cp1252, utf-8-sig, or Other (with other_encoding_format for any Python codec).

    Output: converted_txt, the hex string (lowercase, no 0x prefix, no separators).

    The node encodes the string to bytes with your chosen encoding and then writes each byte as two hex digits. As with the other converters, the encoding is load-bearing: "Hi" is 4869 in ascii/utf-8 but fffe4800 6900-style in utf-16 (complete with the little-endian byte-order mark). Use utf-8 for the canonical result.

    The input that matters

    text and utf-8. Everything else is an edge case you'll know when you hit.

    Where it fits

    This is the finishing move for a huge fraction of ARG pipelines: hash a string with SHA2, convert the digest to hex with this node, and you have the checksum that goes in the puzzle. Or encrypt with SymmetricEncryptDecrypt and hex-encode the ciphertext bytes for a clue that's copy-pasteable. The pack's Hex2String sibling decodes it back.

    Installing it

    Part of ComfyUI ARG Toolkit - ComfyUI Manager (search "ComfyUI ARG Toolkit") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
    

    Restart ComfyUI. No model files; deps handled by Manager.

    Common issues

    • No 0x prefix - that's normal; the node outputs bare hex. If a tool needs 0x48656c..., prepend it yourself.
    • Odd-length output - with a single-byte encoding the hex is always even-length. If you see odd-length, you're looking at a mismatch between what was encoded and what you expected.
    • Decoding mismatch - decode with the same encoding used to encode, or you'll get mojibake and blame the node.
    CategoryARG Toolkit/Utilities/Converter

    Inputs (3)

    NameTypeDefaultDescription
    textSTRINGHello World!
    encoding_formatCOMBOThe encoding format available for text, may yield different results when converting.
    other_encoding_formatoptSTRINGIf, 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)

    NameTypeDescription
    converted_txtSTRING