JSON Lines Converter
Converts between NDJSON and a JSON array, and reports the number of any line that will not parse instead of stopping.
Converts a JSON array into JSON Lines — one record per line, the format log pipelines and BigQuery want — and back again. It also reads a stream of JSON values with no separator at all, which several logging libraries emit and `JSON.parse` refuses outright.
Input
Drop a .json, .jsonl or .ndjson file
Read in this tab. Nothing is uploaded.
A JSON array, or a stream of values with no separator at all — which is what several logging libraries emit and what `JSON.parse` refuses.
Output
Preview
| ts | level | msg | ms |
|---|---|---|---|
| 2025-08-27T09:00:00Z | info | started | 12 |
| 2025-08-27T09:00:04Z | warn | slow query | 2100 |
| 2025-08-27T09:00:09Z | error | upstream 502 |
The union of every record’s keys, across the first 200 records.
Records
3
In
246 byte
Out
209 byte
How to use it
Choose the direction
Array to lines when you are feeding something that streams; lines to array when you have a log file and want to work with it as one document.
Drop the file in
`.json`, `.jsonl` and `.ndjson` are all accepted — NDJSON and JSON Lines are the same format under two names.
Check the lines that did not parse
A bad line does not stop the conversion. It is listed by number with the text that failed, which is usually a truncated record at the end of a rotated log.
Use the preview to see the shape
The table shows the union of every record’s keys across the first two hundred records, which is the quickest way to notice that half your log lines have a field the others do not.
Common questions
What is the difference between JSON Lines and NDJSON?
Nothing that matters. Two names for the same convention — one JSON value per line, newline separated, no enclosing array. Some tools use one extension, some the other, and both are read here.
Can it handle a multi-gigabyte log file?
No. The whole file is read into the tab, converted in memory and held as a second string. Tens of megabytes is the practical limit; beyond that `jq -c` on the command line is the right tool and will stream.
Why sort keys?
Because JSON Lines is usually compared with `diff`, and `diff` is a line comparison. Two exports of the same data with keys in different orders are entirely different lines. Sorting makes them identical text.
What happens to a nested object?
It stays nested — a JSON Lines record is a whole JSON value, so nesting is fine and nothing is flattened. If you want columns out of it, the JSON to CSV tool is the one that flattens.
Feed it from
JSON ⇄ CSV
Flattens nested JSON into columns or rebuilds objects from a table, with a dot-path column naming rule.
jq Playground
Runs jq 1.7 filters against pasted JSON in the browser with a cheatsheet, and hands you the matching command line.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
YAML Formatter & Validator
Re-indents YAML consistently, validates it, and flags the tab and anchor mistakes that break parsers.
Next
These accept what this tool produces, so the result can go straight in.
CSV Viewer
Opens a large delimited file with type detection, column stats and sorting, without loading it all into memory.
jq Playground
Runs jq 1.7 filters against pasted JSON in the browser with a cheatsheet, and hands you the matching command line.
JSON ⇄ CSV
Flattens nested JSON into columns or rebuilds objects from a table, with a dot-path column naming rule.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
Base64 Encoder & Decoder
Encodes and decodes Base64 and Base64URL for text or files, handling UTF-8 correctly.
curl to Code
Converts a curl command into fetch, axios, Python requests, Go, PHP or PowerShell.