Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON to NDJSON Converter

Turn an array into one JSON value per line for a log or a stream, and turn those lines back into an array.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    JSON

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    NDJSON

    The result appears here.

    Batch validation

    A report on the JSONL in the left pane, whichever direction is selected. Nothing here changes the document.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    NDJSON is one JSON value per line, and that is the whole format. It exists because a reader can handle a line and forget it, which is what makes a log file or a large export streamable when a single enormous array is not. Any JSON value is allowed on a line, not only an object, and no line is indented, because a line break inside a value would end the record. This tool skips a completely blank line rather than failing on it, since almost every file ends with a newline, and it reports a line that does not parse by the number it has in your file rather than by a position in some rewritten document. That skip is the default; the Blank lines option can treat a blank line as a failure instead. Keep valid lines changes what a bad line does to the rest of the file: instead of stopping the conversion, every line is judged on its own, the lines that parse build the result, and the lines that do not are listed with their line number and reason. Both directions go through the token stream, so a twenty digit integer comes back with all twenty digits. Batch validation, below the converter, is a separate report rather than a conversion: it checks every record on its own against an optional JSON Schema, checks for required fields, finds duplicate values in one chosen ID field, and compares every record's keys and types against whichever shape most records actually have, without changing the document.

    How to use

    1. Choose a direction, then paste your document into the left pane or load the sample.
    2. Press Convert. Going to NDJSON needs an array, since that is the JSON shape that is a sequence of values.
    3. Copy the result or download it. Any line that does not parse is reported with its line number.

    Keep reading

    How to convert JSON to NDJSON for logs and streams Read the guide