> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/workflow-builder/nodes/built-in-tools/split-json-json-formatter.md).

# Split JSON (JSON Formatter)

## Split JSON (JSON Formatter)

### Overview & The "Smart" Mechanism

The **JSON Formatter** turns messy text into clean, structured data that other nodes can understand. Think of it like an operations assistant who takes scattered notes, spreadsheets, and copied responses, then reorganizes everything into one consistent format.

It is especially useful when previous steps return content mixed with extra words, broken formatting, or CSV data. This node helps you turn that content into something you can filter, merge, loop through, or display.

#### Smart features

* **Instant pass-through for clean data** : if the input is already structured, the node keeps it as is.
* **Automatic cleanup** : if the input includes extra text before or after the useful content, the node removes that noise first.
* **Flexible format fixing** : if the content is close to valid structured data, the node tries to repair it automatically.
* **AI-assisted recovery** : if standard cleanup does not work, the node makes one more attempt using AI to rebuild the content into a usable format.
* **CSV support** : if you provide a CSV file link, the node converts each row into a separate record.

<figure><img src="/files/XEMV36dfIGBqCEFRXaRt" alt=""><figcaption></figcaption></figure>

### Common Use Cases

* Clean an AI response before sending customer details into a table, chart, or follow-up action.
* Turn a sales or inventory CSV file into structured records for reports, alerts, or bulk updates.
* Standardize copied website content or external system responses before filtering, merging, or looping through them.

### How to Configure

* **Input** : Select the content you want to clean.
  * Use **@** to pull output from a previous node.
  * Paste messy text if it contains customer details, product data, or other structured information inside it.
  * Paste a `.csv` file link if you want the node to turn each row into a record.
* **Cache** : Turn this on if you expect the same input to be used often.
* **Cache time** : Enter how long Diaflow should keep the saved result before refreshing it.
* Run the workflow and review the output. The result should be clean structured data that later nodes can use.

<figure><img src="/files/rWXb0IMkDANvaPq2Vow6" alt=""><figcaption></figcaption></figure>

### Before & After Example

**Before**

```
Here is the customer record: {"name":"Acme","status":"Active"}
```

**After**

```json
{
  "name": "Acme",
  "status": "Active"
}
```

### Important Warnings & Best Practices

* Use a valid and accessible CSV file link. If the file cannot be reached, the workflow may fail.
* Avoid very large inputs, such as full web pages or oversized files. Large content can slow the workflow significantly.
* If your text contains several separate structured blocks, the node may keep only the main outer block. Split complex content first when possible.
* Cache is most helpful when the input is already clean and structured. Messy text may still need to be processed again on each run.
* Do not send secrets, passwords, or highly sensitive personal data unless necessary for the workflow.

### Need help?

* Learn the basics in [How a node works](/getting-started/lets-start-with-the-basics/how-a-node-works.md)
* Build the full flow in [Create a workflow](/workflow-builder/create-a-workflow.md)
* Browse related nodes in [Component List](/workflow-builder/component-list.md)
