JSON → JSONL

Converts a JSON array to newline-delimited JSON (NDJSON).

JSON to JSONL converts a JSON array into newline-delimited JSON (NDJSON), where each array element is written as one compact JSON object on its own line. This format is handy for streaming data, log pipelines, and bulk-loading tools that read one record per line. Paste a JSON array and get JSONL output instantly in your browser.

Common uses

  • Prepare training or fine-tuning data sets that expect one JSON record per line
  • Convert an exported JSON array into NDJSON for bulk import into Elasticsearch or BigQuery
  • Feed line-oriented log processors and streaming pipelines that read one JSON object at a time
  • Split a large JSON array into independent lines so records can be processed or appended individually
  • Generate JSONL fixtures for testing parsers and data loaders

FAQ

Is my data sent to a server?

No. The conversion runs entirely in your browser using JSON.parse and JSON.stringify. Nothing you paste is uploaded or stored on a server.

What input does the tool expect?

It expects a top-level JSON array. Each element of the array, whether an object, number, string, or nested array, becomes one line in the output. If the input is not an array, you will get an error.

Is the output formatted or compact?

Each line is compact JSON with no extra whitespace, produced by JSON.stringify on the element. Lines are joined with a single newline character.

Why do I get an error when I paste a single JSON object?

The tool only converts arrays, since JSONL emits one line per array element. Wrap a single object in an array (for example [ {...} ]) to convert it into one JSONL line.

What happens to nested objects and arrays inside elements?

They are preserved exactly. Only the top level is split into lines; each element keeps its full structure serialized as compact JSON on its line.

Related tools

  • JSON Escape / Unescape
  • JSON Flatten
  • JSON Formatter
  • JSON Merge
  • JSON Minify
  • JSON Patch (RFC 6902)
  • JSONPath Evaluator
  • JSON Repair