Paste NDJSON (newline-delimited JSON, also called JSON Lines) or drop a .ndjson/.jsonl/.txt file to validate it — each line is parsed independently and any bad line is reported with its line number and the parser error, so one broken record doesn't hide the rest. Switch modes to convert NDJSON into a single JSON array, or go the other way and turn a JSON array back into one compact record per line. Blank lines and a trailing newline are treated as legal, per the NDJSON convention. All processing happens locally in your browser — nothing is uploaded. For general JSON validation and pretty-printing, see the JSON Formatter; to convert between CSV and JSON, try CSV ↔ JSON; and to compare two JSON documents, use JSON Diff.
NDJSON / JSON Lines Formatter
Validate and format NDJSON / JSON Lines data
Output will appear here...Frequently asked questions
What is NDJSON?
NDJSON ("Newline Delimited JSON," also called JSON Lines) is a text format for streaming or storing a sequence of JSON records, one complete JSON value per line, separated by a single newline character. It is widely used for log files, data pipelines, and API responses that stream records incrementally, since each line can be parsed independently without waiting for the whole document.
How is NDJSON different from a JSON array?
A JSON array wraps every record in a single [ ... ] value, so a parser must read the entire document before it can access any element, and one syntax error anywhere invalidates the whole file. NDJSON instead gives each record its own line with no wrapping array or commas between records, so lines can be read, parsed, and processed one at a time — a broken line only breaks that line, not the rest of the file.
Is there a difference between .jsonl and .ndjson files?
No meaningful difference in the data itself — both extensions describe the same one-JSON-value-per-line convention (blank lines and an optional trailing newline are legal in both). ".ndjson" points to the ndjson.org spec and ".jsonl" points to jsonlines.org; which one a tool or dataset uses is mostly a naming preference, and this tool accepts either extension (plus plain .txt).
Does my data leave my browser?
No. Validation and conversion run entirely client-side in JavaScript — nothing is uploaded to a server, there is no signup, and the tool works fine offline once the page has loaded.
Get weekly dev tools and tips