Convert one-JSON-per-line (NDJSON) and JSON arrays in both directions
null. In the JSON to JSONL direction a non-array value is emitted as a single line. Record order is preserved and blank lines are skipped.
Paste JSONL (one JSON value per line) on the left and press "JSONL → JSON" to get a JSON array on the right. Paste a JSON array on the right and press "JSON → JSONL" to get one record per line on the left. This is useful for BigQuery load files, one-record-per-line logs, and machine learning datasets that you want to inspect as a single JSON array.
JSONL guarantees only one thing: a line break ends a record. If a record spans several lines that guarantee breaks and a reader can no longer count records. That is why this tool never pretty-prints in the JSON to JSONL direction. In the other direction the records are already collected into an array, so indentation is free to choose.
Blank lines are skipped and are not counted as records. After each conversion the tool reports how many records were read, how many blank lines were skipped, and how many input lines there were, so you can check the count against what you expected. If a line cannot be parsed, the tool reports its line number and stops instead of returning a partial result that would hide the gap.
They are two names commonly used for the same format. In both, each line holds exactly one JSON value and the line break is the record separator, so a record never contains a raw newline. Both the .jsonl and .ndjson extensions are in use. This tool treats input under either name the same way.
The tool reports which line number could not be parsed and does not convert. Because each line is one record in JSONL, the damage is usually limited to that single line. Fix the reported line and convert again. Blank lines are not errors; they are skipped and counted separately.
No. The conversion runs entirely in JavaScript in your browser. The JSONL or JSON you paste is never sent to or stored on a server.