← All nodes
Unstructured Text

JSON Minifier

Compress JSON onto a single line by removing all unnecessary whitespace.

When to use it

Typical uses: Reducing API request and response sizes; Storing JSON in environment variables or a single database field; Embedding JSON in HTML or JavaScript.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
Text columnselect—Text
Generate New Columncheckbox—false
New Column Nametext—Default: <column> Result
Insert Afterselect—After the column
When a value cannot be convertedselect—stop

Example

JSON Minifier: an example

    Text arriving
    Text
    { "id": 42, "title": "Hello world", "tags": [ "a", "b" ] }
    The text after this node
    Text
    {"id":42,"title":"Hello world","tags":["a","b"]}

    Worth knowing

    • How much smaller will my JSON be? It depends on the indentation. Heavily indented files often shrink by 20–40%.
    • Are spaces inside strings removed? No. Only whitespace between tokens is removed.
    • How do I make it readable again? Use the JSON Formatter.
    • Works on any text column, not only Text Input's: pick it under Text column. Tick Generate New Column to keep the original next to the result.

    Others in Unstructured Text