JSONL Converter — JSON Lines to JSON & Back

Turn JSON Lines (JSONL / NDJSON — one JSON object per line, as used by logs, BigQuery, OpenAI fine-tuning and data exports) into a JSON array, or an array back into JSONL. Every line is validated, with the line number of each error.

Runs in your browserUpdated
Convert

    Your data never leaves your computer. All processing happens 100% locally in your browser.

    How to use the JSONL Converter

    1. Choose JSONL → JSON or JSON → JSONL.
    2. Paste the data or drop a .jsonl / .ndjson / .json file onto the input.
    3. Invalid lines are listed with their line number; tick Skip invalid lines to convert the rest.
    4. Copy or download the result.

    What is JSON Lines?

    JSON Lines (also NDJSON, newline-delimited JSON) stores one complete JSON value per line. Because each line stands alone, files can be appended to, streamed and split without parsing the whole thing — which is why it is used for logs, analytics exports, BigQuery and Elasticsearch bulk imports, and OpenAI fine-tuning files.

    {"id": 1, "name": "Ada"}
    {"id": 2, "name": "Linus"}

    A JSON array holds the same records inside [ … ], which most tools and JSON.parse expect. This converter goes both ways and validates every line.

    Common errors

    • A record spread over several lines — every record must be on a single line.
    • A trailing comma at the end of a line, or [ ] wrappers left in the file.
    • Blank lines are ignored.

    Related: JSON Formatter, JSON to CSV, CSV to JSON.

    Also searched as: jsonl to json, json to jsonl, ndjson to json, json lines, jsonl validator, convert jsonl, jsonl viewer, openai jsonl.

    Tools that pair well with the JSONL Converter

    • JSON5 to JSON Converter — Paste JSON5 or JSON with comments (JSONC, like tsconfig.json or VS Code settings) and get strict, valid JSON.
    • JSON Validator — Paste JSON to check whether it is valid.
    • JSON to Excel — Turn a JSON array into a real Excel workbook.
    • JSON Schema Validator — Paste a schema and some JSON to see exactly which values break which rule — or generate a starting schema from example data.

    Frequently asked questions

    How do I convert JSONL to JSON?
    Paste the JSON Lines (or drop the file) with JSONL → JSON selected. The output is a JSON array of all valid records.
    What is the difference between JSONL and NDJSON?
    None in practice — both mean one JSON value per line, separated by newlines.
    How do I make a JSONL file for OpenAI fine-tuning?
    Put your examples in a JSON array, choose JSON → JSONL and download the result: each example is written on its own line.
    Is my data uploaded?
    No. Everything runs in your browser.
    Can I install JSONL Converter as a web app and use it offline?
    Yes. JSONL Converter is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

    Related tools