JSONL to JSON Array Converter
Convert JSON Lines (NDJSON) to a pretty JSON array and back, two ways, live as you type — runs 100% in your browser with no upload.
🔒 Converted in your browser — nothing is uploaded.
What this tool does
JSON Lines (also called NDJSON, newline-delimited JSON) stores one JSON value per line, which is ideal for logs and streaming but awkward to read or paste into code that expects a single array. This converter turns a JSONL block into a neatly indented JSON array, and turns a JSON array back into JSONL where each element sits on its own line. Both boxes are linked, so editing either side instantly rebuilds the other. Blank lines are ignored, and every value type is supported: objects, arrays, numbers, strings, booleans, and null.
When to use each direction
Go from JSONL to a JSON array when you have exported log lines, a database dump, or an API stream and need one valid array to load with JSON.parse or paste into a config. Go from a JSON array to JSONL when a tool such as BigQuery, jq, or a bulk import endpoint expects newline-delimited records instead of a wrapping array. If a line cannot be parsed, the tool tells you exactly which line number is at fault so you can fix it quickly, and the conversion stays deterministic — the same input always produces the same output.
Frequently asked questions
What is the difference between JSONL and a JSON array?
A JSON array wraps every item in a single [ ... ] structure separated by commas, while JSONL (NDJSON) writes each item as its own JSON value on a separate line with no surrounding brackets or commas. JSONL is easier to append to and stream line by line; a JSON array is a single parseable document.
What happens to blank lines and invalid lines?
Blank or whitespace-only lines are skipped, so trailing newlines do not create empty entries. If a non-empty line is not valid JSON, the tool stops and shows the exact 1-based line number so you can locate and fix the problem.
Is any of my data uploaded to a server?
No. The conversion runs entirely in your browser with JavaScript. Your JSONL and JSON never leave your device — nothing is uploaded, logged, or stored.