Nodes/ComfyUI-LogicUtils/Base64 to String Decode
ComfyUI Node

Base64 to String Decode

Unwrap a base64 payload back to text

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Base64 to String Decode
    • STRING
    base64_string

    This is the reverse of base64 encoding: feed it a base64 STRING, get the decoded text back out. It lives under the pack's image category next to Image to Base64 Encode, but don't let that placement fool you - its output is STRING, not IMAGE. It's built for round-tripping text payloads that happen to arrive base64-wrapped, not for turning an encoded image back into something you can render.

    That matters if you were hoping to pair it directly with Image to Base64 Encode to get an image back into the graph after a round trip through an API - that path doesn't exist in this node set. What this node is actually good for: unwrapping a base64-encoded string that came back from an API response, a webhook payload, or any external system that hands you text data base64-wrapped for transport, so the rest of your graph can work with the plain text underneath.

    How it works

    It base64-decodes base64_string and returns the decoded bytes as a STRING. If the underlying data isn't actually text (raw image bytes, for instance), you'll get back a decoded byte sequence rendered as a string, not something usable - see the troubleshooting note below.

    The inputs and outputs that matter

    • base64_string - the STRING to decode. Required, no default shown - this one's meant to be fed from an upstream source, not typed by hand.
    • Output - STRING, the decoded text.

    How to install it

    Comes with the full LogicUtils pack. Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aria1th/ComfyUI-LogicUtils
    

    then restart ComfyUI. No models, nothing heavy - base64 decoding is standard-library Python, no extra dependency to fetch.

    Background on the pack: it's written by aria1th, publicly known as AngelBottomless, the trainer behind Illustrious XL - the SDXL anime finetune that displaced Pony Diffusion v6 as the open-source default. LogicUtils is his side project, documented exactly as much as the README admits: "Proper documentation is being prepared, however there are too many nodes." That's held since the repo's last push in early 2026. It's a real, used pack - it turns up as a dependency in complex published workflows next to rgthree-comfy and comfyui-kjnodes - just under-explained, which this article is trying to fix.

    Common issues & troubleshooting

    Decoding an image's base64 string doesn't give you back a usable image. That's expected, not a bug - this node decodes to STRING, and raw image bytes forced into a string generally aren't valid UTF-8, so you'll get garbled or partially-broken text rather than anything you can display. If you need the image itself back, this node isn't the tool; there's no base64-to-IMAGE node in this pack's set to reverse Image to Base64 Encode.

    Getting a decode error. The input has to actually be valid base64 - a string with the wrong padding, stray whitespace, or characters outside the base64 alphabet will fail. Double-check the source didn't truncate or re-encode the string somewhere upstream.

    Output looks like binary garbage. If the original payload wasn't text to begin with (image bytes, compressed data, anything non-UTF-8), decoding it into a Python string is inherently lossy or unreadable. This node is for text-shaped base64 payloads specifically, not arbitrary binary ones.

    Categoryimage

    Inputs (1)

    NameTypeDefaultDescription
    base64_stringSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING