JSONL and NDJSON ValidatorONLINE

Validate JSON Lines by line and convert between JSONL and JSON arrays.

1 MiB per input · Ctrl / ⌘ + Enter to run

One complete JSON value per line. A blank interior line is reported as an error.

Result
Ready. Paste input, then run the tool.
Your JSON stays in your browser. Core processing happens locally.
THE PRACTICAL GUIDE

Validate JSONL and NDJSON one complete record at a time

JSON Lines stores separate complete JSON values on successive lines. This validator checks records individually and can collect them into one JSON array or split an array back into lines.

When should you use it?

  • Diagnose a malformed line in an event log.
  • Convert an NDJSON export for a JSON-only API.
  • Create line-oriented records from an array.
WORKED EXAMPLE

Example: two independent records

Each input line is validated separately before the records are collected into one array.

JSONL input
{"id":1}
{"id":2}
JSON array
[
  {"id":1},
  {"id":2}
]

A line is the record boundary

In JSONL, each record line contains one complete JSON value; this tool rejects interior blank lines. A pretty-printed object spread across several physical lines is therefore not one valid JSONL record. Newlines inside a string must be escaped as \n so the record stays on one physical line. This makes the format convenient for logs and exports where records are handled individually.

Choose conversion direction before checking the result

Converting JSONL to JSON collects the records into an array. Converting a JSON array to JSONL writes each item on its own line without the outer brackets. Keep the order when it carries meaning, such as event chronology. This browser tool operates on the supplied text within its input limit; it is not a streaming processor for an arbitrarily large log file.

AT THE WORKBENCH

Inspect a stream one record at a time.

JSONL stores independent JSON values on separate lines. Validate each line and view the records together as a JSON array.

  1. Paste JSON Lines

    Use .jsonl or .ndjson text, or switch to JSON array input.

  2. Validate each record

    Malformed lines are identified by their line number.

  3. Convert

    Copy or download JSON array or JSONL output.

IN PRACTICE

How do I find the invalid line in an NDJSON export?

Paste the line-oriented file into the JSONL validator. Each record line must contain one complete JSON value without commas between lines; interior blank lines are errors. The report names the failing line, which is easier to fix than parsing the entire file as one JSON document.

Two valid JSON Lines records

jsonl
{"id":1,"event":"open"}
{"id":2,"event":"close"}

The tool can also collect these two lines into a JSON array. An interior blank line is reported, so remove accidental gaps in the source.

No. JSONL has one independent value on each line; an array wraps items in brackets and separates them with commas. Choose the export format required by the next system.

BEFORE YOU USE THE RESULT

What should you check before using the result?

An interior blank line is an error, and the total input is limited to 1 MiB. A JSONL file is not one valid JSON document without conversion.

JSON versus JSONL

A JSON document contains one root value. JSONL contains one complete JSON value on each nonblank line, with no commas between lines. This tool can turn the line sequence into an array and reverse that conversion.

Per-line limits

The total input is limited to 1 MiB. Each line is checked with the strict JSON parser. No records are uploaded or stored in browser storage.

Understand JSONL records

Technical reference: JSON syntax and interoperability · RFC 8259

THE JSON FIELD GUIDE
All guides