CoreJSON

JSON to NDJSON

This converter splits a JSON array into NDJSON (JSON Lines), one record per line. The result is a .jsonl document that fits logging, streaming APIs and bulk imports, where each line is an independent JSON value. Each record can stay on a single line or be expanded for readability, and the conversion runs entirely in your browser — nothing is uploaded.

Open in the workbench Runs locally · nothing is uploaded

How to use it

  1. 1

    Paste your JSON array

    Drop an array into the editor, or pick a local .json file. It is read locally and never uploaded.

  2. 2

    Choose a per-record indent

    The default Single line output produces standard NDJSON; expand each record if you want to inspect it.

  3. 3

    Let it split automatically

    Each element is serialised onto its own line, and the tool reports how many records were written.

  4. 4

    Copy the result

    Copy the .jsonl text in one click, or flip the direction to merge NDJSON back into an array.

Key features

One record per line

Every array element is serialised onto its own line, matching the JSON Lines spec and ready for streaming writes.

Optional record expansion

Keep the default single-line output, or indent each record for human inspection.

Key sorting

Recursively sort keys so the output is stable and easy to compare across versions.

Safe escaping

Newlines inside nested strings are escaped as \n so they cannot break the one-record-per-line structure.

Handles large arrays

Big arrays are split on a background thread so the interface stays responsive.

Local and private

Splitting runs in a Web Worker in your browser; nothing is uploaded.

Common errors & troubleshooting

  • ! Array elements can be objects, arrays or scalars; scalar values each take their own line.
  • ! A newline inside a nested string is escaped as \n so the one-record-per-line structure stays intact.
  • ! An empty array produces empty output — a .jsonl file with no records.
  • ! Many data pipelines expect exactly this one-record-per-line format, so the output can often be fed straight in.

Frequently asked questions

Can NDJSON be loaded straight into a database?

Yes. Many data pipelines accept .jsonl with one record per line, so the output can often be ingested directly.

What does an empty array produce?

Empty output — no records at all.

How does this differ from the NDJSON to JSON tool?

They are inverse operations: this one splits an array into lines, while the other merges lines back into an array.

Is my data uploaded?

No. The conversion runs locally in your browser; nothing leaves your device.

Related tools