Processed on your device

JSON Lines converter

Convert a JSON array to JSON Lines (JSONL, NDJSON), one value per line, or JSON Lines back to an array.

1

Make it yours

To read JSON Lines, replace the example with one JSON value on each line.
No uploads

Ready when you are. Nothing runs until you choose.

2

Your result

Your result will appear here.

About JSON Lines converter

Use this to move data between a JSON array and JSON Lines, the format with one JSON record per line that is also called JSONL or NDJSON. JSON array to JSON Lines prepares data for systems that read a line at a time, such as log pipelines, bulk-import tools and machine-learning datasets. JSON Lines to JSON array opens such an export in tools that expect a single JSON document.

How it works

For JSON array to JSON Lines, StillKit parses the text, requires an array and writes each item on its own line in compact form, without commas between lines or surrounding brackets. For JSON Lines to JSON array, it splits the text at line breaks, skips blank lines and checks every remaining line as JSON on its own. The values are combined into an array in their original order and printed with 2-space indentation.

Tips

  • Line breaks inside text values stay escaped as \n, so each record stays on a single line.
  • Items can be any JSON value, including numbers, strings and arrays, not only objects.
  • JSON Lines output has no line break after the last record. Results over 100,000 characters also come as stillkit-result.txt; rename it to .jsonl.
  • When reading JSON Lines, each record must fit on 1 line. A pretty-printed object spread over several lines fails, so minify such records first with JSON minifier.
  • An error names the line by its number in your input, blank lines included. To see exactly where that line breaks, paste it into JSON validator.
GOOD TO KNOW

Limits

Maximum 1 MB input, 100 levels of nesting and 50,000 nodes. JSON only; no expressions are evaluated. Output is inert text. Number precision follows JavaScript; use strings for large exact integers. Reading JSON Lines takes at most 10,000 lines.

How tools run on your device →
EXAMPLE

A worked example

Example input

JSON array or JSON Lines: [{"name":"Asha","score":92},{"name":"Ben","score":88},{"name":"Asha","score":92}]
Direction: JSON array to JSON Lines

Example result

{"name":"Asha","score":92}
{"name":"Ben","score":88}
{"name":"Asha","score":92}

Questions and answers

What is the difference between JSON Lines, JSONL and NDJSON?

They are names for the same idea: a text file in which every line is one complete JSON value and lines are separated by line breaks. This tool reads and writes that form, whatever the file is called.

How many lines can it read?

Up to 10,000 non-blank lines, within 1 MB of text. Blank lines are skipped and do not count, so a trailing newline or gaps between records cause no error. The combined data is also limited to 50,000 values, nested ones included.

Why does converting my JSON Lines give an array inside an array?

The text was a single line holding a whole array, so that array became one item. If your data is already a JSON array, it does not need this direction; choose JSON array to JSON Lines to go the other way.

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →