Skip to Content
ToDiagram

JSONL

Visualize JSON Lines files, one record per line

Open logs, event streams and datasets stored as JSON Lines (.jsonl or .ndjson), where every line holds one JSON value.

Example

{"ts":"2026-11-28T09:12:04Z","level":"info","event":"order.created","order":"A-1042"}
{"ts":"2026-11-28T09:12:09Z","level":"warn","event":"payment.retry","order":"A-1042","attempt":2}
{"ts":"2026-11-28T09:12:15Z","level":"info","event":"order.paid","order":"A-1042","total":138.5}
The three log lines above as a diagram: a root node linked to one node per line
The same lines as a diagram.

Open a JSON Lines example in the editor

How Records Are Shown

  • Each line is one record. The diagram shows the records in file order, the same way it shows a JSON array.
  • Blank lines are skipped.

Editing

Changes made on the canvas or in the tree view are saved back as JSON Lines, one compact line per record.

Copying a record, or a value inside one, gives formatted JSON. Copying the whole document gives JSON Lines. Open in New Tab on a record opens it as a JSON document.

Errors

If a line isn't valid JSON, the diagram doesn't load and the editor marks that line. The error message starts with the line number, such as Line 3:.

JSON Schema

A schema attached to a JSONL document describes a single record, and every record is checked against it. The generate button in the JSON Schema dialog creates a schema for one record.

When you switch a document between JSONL and another format, ToDiagram converts its schema to match: a record schema for JSONL, and an array of records for the other format.

Detection

Text with two or more lines that each hold a JSON object or array opens as JSONL. This includes pasted text and .json files that contain JSON Lines.

On this page