Convert JSON to String [LP]
Serializing a JSON object back to text
- json_object
- json_string
The mirror image of ConvertStringToJson-LP: feed it ComfyUI's native JSON type, get back plain text. Useful the moment you need a JSON value to leave the "structured object" world and go somewhere that only speaks strings - a Show Text node, a save-to-file step, a log line, or a text input on a node that has no idea what a JSON socket even is.
Why you'd need this
Once you've built or received a JSON object in the graph - maybe by parsing text with ConvertStringToJson-LP, maybe from an API call node elsewhere in the pack - a lot of the rest of ComfyUI simply doesn't accept that type. Text-preview nodes, file-writers, and most third-party nodes want a STRING. This node is the one-way conversion that lets a JSON value participate in all the plain-text tooling the rest of ComfyUI is built around, without you writing custom serialization logic yourself.
Like its sibling, this is a recent (v1.3.4, 24-02-2026) addition, and the README credits Comfyui-Simple-Json-Node for the pack's JSON nodes generally.
How it works
This is almost certainly a plain json.dumps() under the hood - walk the object, produce a JSON-formatted string. Nothing in the schema exposes formatting options (no indent level, no key sorting), so treat the output as compact, single-line JSON rather than something pretty-printed for human reading.
The inputs and outputs that matter
- json_object - the JSON value to serialize. No default shown, since there's no sensible "empty" value to fall back to for an arbitrary object type - you need something upstream actually producing a JSON object.
- Output - json_string, a plain STRING containing the serialized JSON text.
One input, one output, nothing to configure.
How to install it
ComfyUI Manager: search "ComfyUI Level Pixel" or ComfyUI-LevelPixel, install, restart - auto-updates via Manager's "Update ALL." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/LevelPixel/ComfyUI-LevelPixel.git
Restart ComfyUI. No models, no extra dependencies - pure serialization.
Common issues & troubleshooting
The output is one long unbroken line and you wanted something readable. That's expected if this is a bare json.dumps() call - there's no pretty-print toggle exposed on the node. If you're debugging and want to actually read the structure, paste the output into an external JSON formatter, or just eyeball it through a Show Text node - it's still valid JSON, just compact.
Nothing is connected to json_object and the node errors. Unlike ConvertStringToJson-LP, which defaults to an empty "{}" string so it never errors unconnected, this node has no meaningful default for an arbitrary JSON value - it genuinely needs a real object wired in from somewhere upstream.
You need to go the other direction. That's ConvertStringToJson-LP - text back into a JSON object. The two are meant to bookend a segment of your graph where you need to inspect, save, or transmit a JSON value as plain text, then bring it back into structured form afterward.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| json_object | JSON | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| json_string | STRING | — |