Skip to content

Data

JSON & NDJSON Converter

Convert JSON arrays to NDJSON or JSON Lines and combine one-value-per-line records into a formatted JSON array.

How to use this tool
  1. Choose JSON array to NDJSON or NDJSON to JSON array.
  2. Paste the source; each NDJSON record must occupy one line.
  3. Convert, inspect any record errors and download the result.

Loading tool…

Find this tool in

Helpful references

About this tool

What is JSON & NDJSON Converter?

Convert a JSON array into one JSON value per line for tools that consume NDJSON, or collect those lines into a JSON array. Each output line is an independent JSON document. This page processes bounded input in the browser; it does not stream an arbitrarily large log from a server.

A worked example

Write two records as independent JSON lines

Example input

[{"id":1},{"id":2}]

Expected result

{"id":1}
{"id":2}

Choose JSON to NDJSON. The array brackets and separating comma disappear because each line is serialized separately. Reverse the operation to recover an array containing both objects. An actual newline inside a string is escaped within its record, rather than turning into a second NDJSON record.

Common mistakes and limits

  • Pretty-printed objects spanning several physical lines are not valid individual NDJSON records for this importer.
  • A failing record needs correction at its reported line. Do not concatenate partial output and assume it represents the complete source.

Features

What you can do

  • JSON array to NDJSON/JSONL
  • Line-numbered errors when combining records
  • Scalars, objects and nested arrays within bounded documents

Frequently asked questions

Questions about JSON & NDJSON Converter

Which data and limits does JSON & NDJSON Converter support?

Use 1–5,000 records, up to 1 million characters, 20,000 values and 32 levels. Blank NDJSON lines are ignored. Integers outside JavaScript's safe range must be quoted to avoid rounding; this is a bounded browser converter rather than an unbounded streaming processor.

Related tools