Convert Dictionary to String
Turn a JSON object back into text
- dictionary
- STRING
Some nodes give you structured data; some nodes take text. Convert Dictionary to String (ConvertDictionaryToString) is the bridge between those two worlds: it takes a DICT - the structured key/value object that comes out of nodes like Build JSON Prompt (Ideogram) or any API/JSON node - and serializes it into a plain JSON string. It's the inverse of the "parse JSON into an object" step, and it's the tool you reach for when a structured object needs to become text again.
Why would you want that? Three common reasons. You're logging or debugging - a structured dict is opaque until you can read it, and a stringified version is something you can throw at a text display or a Save Text node. You're saving state - dumping a config object to a .json file for later. Or you're feeding something that only accepts text - an LLM node that wants a prompt describing the data, a text-only input that needs to see the whole object as a string.
How it works
The mechanism is one call: json.dumps(dictionary, indent=indent). Two inputs, one output:
- dictionary - a DICT-typed input. This is a real structured object, not text - it comes from a node that outputs a dict, so it arrives already parsed. Don't paste raw JSON into this field; if you have JSON as a string, you need to parse it first (or use a JSON-from-text node) before this node can stringify it.
- indent - spaces per indent level, 0 to 8, default 2. Same behavior as its array sibling: 0 produces a compact single-line string; the default gives you the readable, pretty-printed form.
Output is a single STRING containing the JSON text. Because the serializer keeps ensure_ascii off, non-ASCII characters (accents, CJK, emoji) come through readable rather than as \uXXXX escapes - a detail that matters when the dict holds captions or names.
Common issues
The pairing people reach for: Convert Dictionary to String → Extract Text from JSON (or a JSON parser) for round-trips - stringify to move it, then pull values back out downstream. The main confusion is the input type: a DICT socket is not a text box, so if you've got JSON-as-text you'll stare at the wire refusing to connect until you realize the object needs to arrive already structured. Second: like its array sibling, the output is JSON text, so strings inside are quoted and it's not a "pretty human sentence" - it's a serialization. And a corner to remember: only plain, JSON-able values serialize cleanly; a dict holding node-internal objects can refuse to stringify, so keep the contents plain.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| dictionary | DICT | — | |
| indent | INT | 20–8 | Spaces per indent level. 0 produces compact single-line string. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |