JSON to NDJSON Converter
JSON array ↔ NDJSON (JSON Lines), one compact record per line. Parse failures name the offending line number.
3 records
JSON to NDJSON Converter — Free Online Tool
Converts between a JSON array and NDJSON / JSON Lines in both directions, emitting one compact JSON document per line for streaming ingestion or parsing a JSONL file back into a pretty-printed array, reporting the offending line number when a record fails to parse, useful for BigQuery and Elasticsearch bulk loads, log pipelines and LLM fine-tuning datasets.
How to use the JSON to NDJSON Converter
- Open the tool above — it runs entirely in your browser, so your input never leaves this page.
- Paste or type your input into the field, then press the relevant button (e.g. Encode / Decode, Generate, or Convert).
- Copy the result from the output area with the copy button orCtrl/Cmd + C.
- No signup, no upload, and no tracking — repeat as often as you need.
Frequently asked questions
What is NDJSON and how is it different from JSON?
NDJSON (also called JSON Lines or JSONL) puts one complete JSON document on each line with no enclosing array and no commas. That lets a consumer process records as they stream in, and lets a producer append without rewriting the file — which a JSON array cannot do.
Why does my JSONL file fail to parse?
Almost always because a record was pretty-printed across several lines. Each line must be one complete, compact JSON document. The converter reports the exact line number that failed so you can find the wrapped record.
Which tools expect NDJSON?
BigQuery and Elasticsearch bulk loads, most log shippers, OpenAI and Anthropic fine-tuning datasets, and anything reading from a stream. A JSON array would require buffering the entire file before the first record is available.
Free & private — why use this JSON to NDJSON Converter
The JSON to NDJSON Converter runs 100% client-side in your browser. Your data is never uploaded to a server, no account is required, and the tool is completely free. It works offline once the page has loaded and is part of a growing collection of privacy-first developer utilities.