JSON Lines (NDJSON) Viewer

Validates newline-delimited JSON one line at a time -- a bad line is reported with its line number without breaking the rest -- and converts between NDJSON and a single JSON array.

Private by architecture: All processing is 100% client-side memory. Your data never leaves this browser tab.
NDJSON input
0 lines · 0 charsNDJSON
Per-line report
Ctrl/Cmd+Shift+C

Paste NDJSON and click Run.

0 lines checkedReport

About This Tool

NDJSON (also called JSON Lines, .jsonl) puts one complete JSON value per line instead of one big array or object -- the format log pipelines, streaming APIs, and ML dataset exports favor because a reader can process records one at a time, and one corrupt line doesn't poison the whole file. This tool parses each line independently with the same lenient parser used across this site, reports exactly which lines are valid or broken (with line number and error), and converts in either direction between NDJSON and a standard JSON array.

For a single JSON document that's already an array or object, use JSON Formatter or JSON Validator instead -- those validate the document as a whole rather than line by line.

Key Features

  • Independent per-line validation: every line is parsed on its own; one broken line never blocks the rest.
  • Line-numbered error report: invalid lines show their exact line number and parse error.
  • NDJSON → JSON Array: wraps every successfully-parsed line into one JSON array, skipping invalid lines.
  • JSON Array → NDJSON: flattens a JSON array back into one compact value per line.
  • Blank lines ignored: not reported as errors in either direction.
  • File upload: load a .jsonl, .ndjson, or .json file directly.

Example

NDJSON input with one broken line:

{"id": 1, "event": "login"}
{"id": 2, "event": "click"
{"id": 3, "event": "logout"}

produces this report:

Line 1: valid
Line 2: INVALID, Unexpected end of JSON input
Line 3: valid

Frequently Asked Questions

What is NDJSON / JSON Lines?
A text format where each line is its own complete, independent JSON value -- objects, usually, but any JSON value is valid. It's used by log files, streaming APIs, and ML training datasets because a consumer can process one record at a time without ever loading the whole file into memory, unlike a single giant JSON array.
What happens if one line is broken?
It's reported with its line number and parse error, but every other line still validates and converts normally. That's the point of NDJSON -- one corrupt record in a multi-gigabyte log file shouldn't make the rest of it unreadable.
Are blank lines treated as errors?
No. Blank lines are skipped silently, both when validating and when converting -- they're common in hand-edited NDJSON and aren't part of the data.
How does NDJSON → JSON Array differ from just wrapping lines in [ ] and joining with commas?
That's exactly what it does for every line that parses successfully -- invalid lines are left out of the array rather than breaking the join. Converting back (JSON Array → NDJSON) reverses it: each array element becomes one compact line.