Format, validate, and analyze NDJSON (JSON Lines) files. Part of the DevTools Surf developer suite. Browse more tools in the Data / SQL collection.
Use Cases
Validate and format NDJSON log files from services that emit one JSON object per line.
Convert a JSON array to NDJSON format for streaming pipelines that process line by line.
Inspect the structure of individual NDJSON records without loading the entire file.
Merge multiple NDJSON files into a single stream for batch processing.
Tips
Validate NDJSON by checking that each line is independently valid JSON — a single malformed line shouldn't prevent parsing the rest.
Use the line-count and byte-count stats to estimate parsing time and memory requirements before processing large NDJSON files.
Convert between NDJSON (newline-delimited) and JSON arrays using the transform mode — some APIs produce one format and consumers expect the other.
Fun Facts
NDJSON (Newline Delimited JSON) and JSONL (JSON Lines) are the same format by different names — the community informally standardized on JSONL as the common term in documentation after 2018.
Elasticsearch's Bulk API uses a variant of NDJSON — two-line pairs where the first line is an action/metadata object and the second is the document body. It processes millions of bulk ingestion requests daily.
NDJSON's key advantage over a JSON array is streamability: a parser can process each line independently without buffering the entire file, making it practical for files that are larger than available RAM.
FAQ
What's the difference between NDJSON and JSONL?
They're identical formats — one JSON value per line, newline-delimited. NDJSON (Newline Delimited JSON) is the formal name; JSONL (JSON Lines) is the more commonly used informal name in tooling documentation.
Can it handle files with mixed valid and invalid lines?
Yes — invalid lines are flagged with line numbers and error messages while valid lines are processed normally. You can choose to skip or halt on the first error.
Does it support the Elasticsearch Bulk API format?
Yes — Elasticsearch bulk format (action + document pairs) is recognized and can be validated as a bulk request structure in addition to standard NDJSON validation.