Cryonel

JSON Lines (JSONL) Viewer

Paste JSON Lines — one JSON value per line, as used in ML datasets and log streams — to validate each line and view them as a pretty-printed array.

How to use it

Paste JSONL content and click Parse. Blank lines are skipped. If a line fails to parse, the exact line number and error are reported so you can find and fix it without scanning the whole file.

What JSON Lines looks like

JSON Lines, also called JSONL or newline-delimited JSON, stores one complete JSON value on each line. There is no surrounding array and no comma between records. A typical export might contain {"id":1,"event":"login"} on the first line and another independent object on the second. Each non-blank line must be valid JSON by itself, which means strings and property names still require double quotes and literal newlines inside strings must be escaped.

Why systems use JSONL

The format works well for logs, event streams, command-line pipelines, bulk imports, and machine-learning datasets because a producer can append a record without rewriting an entire array. A streaming consumer can process completed lines one at a time and recover its position after a failure. Ordinary JSON arrays are usually more convenient for a small API response, while JSONL is often easier for long-running or append-only data flows.

Convert JSONL to an array

This viewer parses every non-blank line and returns a normal JSON array. For three input records, the result contains three array elements in the same order. Converting makes the data easier to paste into JSON Tree Viewer, validate as one document, or pass to a converter that expects an array. The browser must hold the complete input and output during this conversion, so use a streaming parser in application code for very large files.

Find malformed records by line

When parsing stops, the reported line number refers to the physical input line, including skipped blank lines. Inspect that line for trailing commas, single-quoted strings, unescaped control characters, truncated objects, or multiple records accidentally joined together. Validate the individual line with JSON Validator if the parser message is not enough. Fixing one record does not prove later lines are valid, so run the full conversion again after every correction.

Keep record shapes intentional

JSONL requires syntactically valid lines but does not require every record to share a schema. One line can be an object, the next an array, and the next a number. Many import jobs expect consistent object fields even though the format itself does not enforce them. Check required fields, types, timestamp units, identifiers, and null behavior before loading the array into a database or analytics system. Do not infer that a missing property and an explicit null mean the same thing.

Encoding, privacy, and file boundaries

Use UTF-8 text and a newline between records. A final newline is conventional but this tool does not require one. If an export is split into files, ensure a record was not cut across the boundary. Pasted or opened content is processed locally in the current tab and no record is uploaded to Cryonel. Clear the workspace when finished with sensitive logs, and remember that copying the output places it on the operating system clipboard.

Frequently Asked Questions

What's the difference between JSONL and a JSON array?

A JSON array is one document that must be fully valid to parse at all. JSONL is one independent JSON value per line, so a streaming reader can process line 1 before line 1000 even exists yet — and one bad line doesn't break the rest.

Can one JSONL record span several lines?

No. Each non-blank physical line must contain one complete JSON value; embedded line breaks inside strings must be escaped.

Are blank lines allowed?

This viewer skips them, but producers should avoid unnecessary blank records when another consumer follows a stricter JSON Lines convention.

Related Tools