---
title: "How to Debug NDJSON and JSONL Files - Blobster"
description: "Learn how NDJSON and JSONL store one JSON value per line, how to isolate malformed records and how to inspect valid rows locally."
canonical: "https://www.mochavi.com/blobster/guides/debug-ndjson-jsonl"
markdown_mirror: "https://www.mochavi.com/blobster/guides/debug-ndjson-jsonl.md"
language: "en"
generated_from: "prerendered HTML"
---

> Canonical HTML: [https://www.mochavi.com/blobster/guides/debug-ndjson-jsonl](https://www.mochavi.com/blobster/guides/debug-ndjson-jsonl)
>
> This machine-readable Markdown mirror is generated from the canonical page during the Mochavi production build.

[Blobster](https://www.mochavi.com/blobster) / [Guides](https://www.mochavi.com/blobster/guides)

NDJSON guide

# Treat NDJSON as records, not broken JSON.

One malformed line should not hide a useful log or export. Learn how newline-delimited JSON differs from a JSON array and how to isolate bad records.

Published 28 July 2026 6 minute read By Mochavi

[Install Blobster](https://chromewebstore.google.com/detail/blobster/epddolhfilamhbnmgglenceabjbbeeho) [Read as Markdown](https://www.mochavi.com/blobster/guides/debug-ndjson-jsonl.md)

Short answer

Parse NDJSON line by line. Keep valid records available, report malformed lines separately and use table search when the records have a consistent object shape.

## Key points

-   NDJSON and JSONL contain independent JSON values separated by newlines.
-   The complete file is not one JSON array and should not be parsed as one.
-   Line-level errors let you repair a bad record without losing the rest of the dataset.

## Why a normal JSON parser rejects the file

A JSON document has one top-level value. NDJSON deliberately places another complete JSON value on each line. The format is convenient for logs, streaming pipelines and append-only exports, but the full text is not a valid JSON array.

Pasting NDJSON into a conventional JSON formatter often produces an error after the first line. That error describes the parser mismatch, not necessarily a broken dataset.

Three independent records

```
{"time":"2026-07-28T09:00:00Z","status":200}
{"time":"2026-07-28T09:00:01Z","status":503}
{"time":"2026-07-28T09:00:02Z","status":200}
```

## Keep valid records around a bad line

Line-delimited parsing creates a useful failure boundary. If line 417 is malformed, lines 1 through 416 and 418 onward can still be inspected. The viewer should report the line number and preserve the original source so the record can be corrected.

This matters for incident logs and bulk exports, where throwing away every valid record because of one truncated write is usually the least helpful behaviour.

## Choose table or tree by shape

An object-per-line dataset with recurring fields maps naturally to a table. Columns make status codes, timestamps and identifiers easy to scan and filter. Records with highly variable or deeply nested structures are usually clearer in a tree.

Keep raw source nearby in both cases. A table is a projection of the records; it should not conceal malformed lines or imply that every object has the same schema.

## A practical NDJSON debugging loop

Blobster detects NDJSON and JSONL, shows object-like records as a table where practical and keeps invalid lines separate from valid rows. The document remains local, including edits and copied subsets.

-   Open the `.ndjson` or `.jsonl` file locally.
-   Confirm record count and review any invalid-line summary.
-   Filter by the field involved in the incident.
-   Open the matching record in tree or raw form.
-   Copy only the relevant row or a redacted subset.

## Sources

-   [NDJSON specification](https://github.com/ndjson/ndjson-spec)
-   [Blobster NDJSON viewer](https://www.mochavi.com/blobster/ndjson-viewer)

Related

[NDJSON viewer→](https://www.mochavi.com/blobster/ndjson-viewer)[JSONL viewer→](https://www.mochavi.com/blobster/jsonl-viewer)

Machine-readable

[Markdown version→](https://www.mochavi.com/blobster/guides/debug-ndjson-jsonl.md) [Blobster RSS feed→](https://www.mochavi.com/blobster/feed.xml)

Local-first workbench

## Inspect the data. Keep the document local.

Open JSON, logs, tokens, configs and tables in Blobster without adding an account, telemetry or a public paste URL.

[Install from Chrome Web Store](https://chromewebstore.google.com/detail/blobster/epddolhfilamhbnmgglenceabjbbeeho)
