JSONL ↔ JSON converter
Turn a JSONL file (one JSON value per line, also called JSON Lines or NDJSON) into a JSON array, or split a JSON array into JSONL. Every line is validated, so it doubles as a JSONL validator for logs and datasets.
Your data never leaves the browser — files are read locally, nothing is uploaded.
Direction
Options
Not converted
Line errors
- :
The preview is cut at 200,000 characters. Copy and Download include everything.
Keys across records
| Key | Records with it |
|---|---|
|
About this tool
JSONL stores one complete JSON value per line. Logs, event histories and dataset exports use it because you can append a record without rewriting the file. Many tools want a regular JSON array instead, and some APIs want the opposite: OpenAI's Batch API, for example, takes a.jsonl file with one request per line.
JSONL → JSON parses each line on its own and collects the values into an array. A line that fails shows up with its line number, the column where parsing stopped, and the parser's message. Following the JSON Lines rules, a blank line counts as an error, while a final newline and Windows CRLF line endings are fine. Tick "Ignore blank lines" or "Skip invalid lines" to convert a messy log anyway. The key table shows how many records contain each top-level key, which is a quick way to spot inconsistent records.
JSON → JSONL takes an array and writes each element withJSON.stringify on its own line, ending with a newline. Strings that contain line breaks are escaped as \n, so a record never spans two lines. If you paste pretty-printed JSON as JSONL (or the other way around), the tool says so.
Watch out for big integers. JavaScript numbers lose precision above 9007199254740991, so an ID like 820982911946154508 comes out with different digits after any JSON parse. The tool flags the lines where that happens. Files up to 25 MB open in the page; for bigger ones, jq is the better tool.
Read more
- JSONL: a practical guide to JSON Lines
- The jq command — filter JSON and JSONL from the terminal
- Introduction to JSON
- Parsing JSON with Node.js
Free books, courses, and software
Get my programming books, course editions, and complete software.
Get the download library →