What is NDJSON?
NDJSON (newline-delimited JSON), also called JSON Lines or JSONL, is a format where each line is a complete, independent JSON value — usually an object. There are no surrounding brackets or commas. It is the de facto standard for log files, streaming pipelines, and bulk-load APIs because each line can be parsed independently without holding the whole document in memory.
When should I use NDJSON over a JSON array?
Use NDJSON when records arrive over time (logs, events, telemetry), when you need to append without rewriting the whole file, when downstream consumers stream rather than load, or when a tool explicitly requires it (BigQuery batch loads, Elasticsearch _bulk, Loki, Vector). Use a regular JSON array when you want a single self-describing payload that fits in memory.
What are the streaming benefits?
NDJSON is line-oriented, so a parser only needs one line at a time — constant memory regardless of total file size. Producers can flush each record immediately without waiting for the array to close. Consumers can resume from any line after a failure. Compression ratios are usually similar to a regular JSON array because the redundant structure is identical.
Is JSON Lines the same as NDJSON?
Effectively yes. JSON Lines (jsonlines.org) and NDJSON (ndjson.org) define the same format: UTF-8 encoded, one JSON value per line, terminated by \n. The .jsonl and .ndjson extensions are interchangeable in practice. Some specs mandate that lines must be objects; others allow any JSON value — but most real-world usage assumes objects.
How does BigQuery use NDJSON?
BigQuery batch loads accept NDJSON natively (sourceFormat NEWLINE_DELIMITED_JSON). Each line is parsed as one row, with field names mapped to the table schema. This is faster and cheaper than uploading a single huge JSON array — and it is required for streaming inserts.
How does Elasticsearch use NDJSON?
The Elasticsearch _bulk API expects NDJSON: alternating action lines and document lines, separated by newlines. Logstash, Filebeat, and Vector also write NDJSON to disk before forwarding, because it is append-friendly and easy to tail.
Are there any downsides to NDJSON?
NDJSON cannot represent a single top-level non-object value (like an array of arrays) cleanly, and it is unfriendly to humans browsing in a text editor — every record is on a single long line. Regular JSON with indentation is more readable for small documents.
Is my JSON sent to your servers?
No. Conversion runs in JavaScript inside your browser. Open DevTools and check the Network tab when you click Convert — no requests are made. Logs and exports often contain user data; this tool keeps them on your device.