ToolFeather
Developer / SEORuns in your browser

JSON Lines (JSONL) to JSON Converter

Turn JSON Lines — one JSON value per line, as written by log shippers, BigQuery and MongoDB exports, and ML datasets — into a single JSON array, with the line number of any line that isn't valid JSON.

Quick presets

JSONL to JSON

JSON Lines
JSON

Runs in your browser — nothing you enter is uploaded or stored.

ToolFeather · JSONL → JSON
Scratchpad auto-saved
Stored in this browser (localStorage)
Step-by-step~40s read

How it works — in four simple steps

No signup and nothing to install — it all runs in your browser.

1

Add your JSON Lines

Paste it into the left box, press Open file, or drag a .jsonl file onto it. Sample loads a realistic example.

2

Set the options

Adjust the options above the boxes — the output updates instantly as you change them.

3

Check the result

Read the status line: it reports rows, keys and any value that couldn't be represented in JSON.

4

Copy or download

Copy the JSON or download it as a .json file. Nothing was uploaded at any point.

Pro tip

If a line won't parse, the error names its line number — handy for finding one truncated record in a big log.

Features

Pretty or minified

2 or 4 spaces, tabs, or a minified single line for the smallest possible file.

Private by design

Parsing and conversion run in your browser with JavaScript — your data is never uploaded, logged or stored.

About the JSONL to JSON

JSON Lines (also called newline-delimited JSON, NDJSON) stores one complete JSON value per line. It's the format of choice for anything streamed or appended: application logs, BigQuery and Elasticsearch exports, mongoexport output, OpenAI and other fine-tuning datasets, and the results of tools like jq -c. Because each line stands alone, files can be huge, split anywhere, and processed line by line.

Many tools, though, expect a single JSON document. This converter reads the input line by line, parses each non-empty line as JSON, and collects the values into one array in order. Blank lines are skipped, Windows line endings are handled, and a UTF-8 byte-order mark at the start is ignored. If any line fails to parse, conversion stops and the message names that line — useful for finding the one truncated record in a 10,000-line log.

The array can be pretty-printed with 2 or 4 spaces or tabs, or minified. To go back, use JSON to JSONL.

Examples

Structured access-log lines as written by a log shipper, with a blank line in the middle.

JSON Lines input
{"ts":"2026-10-21T09:00:01Z","method":"GET","path":"/","status":200,"ms":12}
{"ts":"2026-10-21T09:00:02Z","method":"GET","path":"/tools/csv-to-sql/","status":200,"ms":18}

{"ts":"2026-10-21T09:00:04Z","method":"POST","path":"/api/feedback","status":429,"ms":3,"retry_after":30}
JSON output
[
  {
    "ts": "2026-10-21T09:00:01Z",
    "method": "GET",
    "path": "/",
    "status": 200,
    "ms": 12
  },
  {
    "ts": "2026-10-21T09:00:02Z",
    "method": "GET",
    "path": "/tools/csv-to-sql/",
    "status": 200,
    "ms": 18
  },
  {
    "ts": "2026-10-21T09:00:04Z",
    "method": "POST",
    "path": "/api/feedback",
    "status": 429,
    "ms": 3,
    "retry_after": 30
  }
]

This output was produced by the converter on this page with the default options — load it with the “Access log” preset above and change any option to see the effect.

How JSON Lines maps to JSON

In JSON LinesBecomes in JSON
Line 1 {"a":1}element 0
Line 2 {"a":2}element 1
Blank lineskipped
Line that is a number or stringthat value as an element
Invalid lineerror with its line number
CRLF line endings / BOMhandled

Things that trip people up

JSON Lines vs JSON at a glance

PropertyJSON LinesJSON
Specificationjsonlines.org · NDJSONRFC 8259 (2017) · ECMA-404
File extension.jsonl / .ndjson.json
Media typeapplication/x-ndjson (common)application/json
Data typesany JSON value per linestring, number, boolean, null, object, array
CommentsNoNo
NestingUnlimited (per line)Unlimited

Frequently asked questions

5 answers
What is the difference between JSONL and JSON?
JSON is one document; JSON Lines is many JSON values, one per line. A JSON array holds the same data but must be read as a whole.
Is NDJSON the same as JSONL?
Practically yes. Both mean one JSON value per line separated by newlines; the names come from two specifications describing the same idea.
How do I find a broken line in a JSONL file?
Paste or open the file; if a line isn't valid JSON, the error message tells you its line number.
Can I convert JSONL to CSV?
Convert to a JSON array here, then use JSON to CSV — or JSON to Excel for a spreadsheet.
Is my data uploaded anywhere?
No. The JSON Lines is parsed and converted by JavaScript in your browser tab; nothing is sent to a server, so it is safe for internal exports, customer lists and configuration files with secrets.