NDJSON is a convenient format for storing or streaming structured data that may be processed one record at a time.
- Each line is a valid JSON value
- Line separator is ‘\n’
cat test.json | jq -c '.[]' > testNDJSON.json
With this simple line of code, you can convert and save files in NDJSON format.
Note: jq is a lightweight and flexible command-line JSON processor.
https://stedolan.github.io/jq/
Very handy
jqapproach 👍For people who need a quick browser-based alternative without command line setup, I’ve been using:
https://jsonviewertool.com/json-ndjson
It’s useful when validating API responses, BigQuery imports, JSONL datasets, or large array payloads before pushing them into pipelines.
The nice part is it instantly converts:
[ {"id":1}, {"id":2} ]into:
{"id":1} {"id":2}which is perfect for NDJSON / JSONL workflows.
The
jqcommand is still ideal for CI scripts, but the browser tool is great for debugging and quick checks.