CoreJSON

NDJSON Formatter

This is an NDJSON / JSON Lines formatter and validator. In NDJSON each line is a separate JSON record: paste log or stream text and the tool parses it line by line. When everything is valid it pretty-prints each record with indentation and reports the record count; when a line is invalid it pinpoints the line, column and expected token. Parsing runs in a Web Worker inside your browser, so logs and business data are not uploaded — you can verify this in the Network panel.

Open in the workbench Runs locally · nothing is uploaded

How to use it

  1. 1

    Paste NDJSON

    Paste JSON Lines text (one JSON value per line, usually .jsonl / .ndjson) into the input, or drag in / open a local file. Files never leave your device.

  2. 2

    Choose the record indentation

    The default is "single line" (each record compacted onto one line, matching standard NDJSON). You can also pick 2 spaces / 4 spaces / Tab to expand each record for manual inspection.

  3. 3

    Pause to process

    About 400 ms after you stop typing it validates line by line: valid input shows the record count, while an invalid line is flagged with its line and column, the cause and a snippet of that line.

  4. 4

    Copy or convert

    Copy the processed NDJSON in one click, or switch modes to merge it into an array or split it back.

Key features

Line-precise error location

On failure it reports "line X, column Y" with an explanation and a snippet of the offending line so you can find it in a long log quickly.

Record-level indentation

Keep each record on a single line (standard NDJSON) or expand each record, balancing machine readability and human review.

Key sorting and blank-line skipping

The output can recursively sort keys for easy diffing, and blank lines at the end are ignored automatically.

Worker-based local parsing

Parsing and formatting run on a background thread so large logs do not freeze the interface, and the data is not uploaded.

Record counting

The status bar reports how many records were parsed, making it easy to confirm none were lost.

Free, no sign-in

No registration, no usage limits and no ads.

Common errors & troubleshooting

  • ! NDJSON requires exactly one JSON value per line with no unescaped line break inside; pasting a multi-line JSON document directly will error — use the "NDJSON to JSON array" mode instead.
  • ! A trailing comma is the most common mistake: each line is an independent JSON value, so a line must not end with a comma.
  • ! Blank lines are skipped by default; if a log mixes in non-JSON comment lines, clean them out before validating.
  • ! Keep the whole file in NDJSON form right up to the point of validation to avoid re-formatting the data twice.

Frequently asked questions

What is the difference between NDJSON and JSON?

JSON has a single root element (an object or an array); NDJSON (also called JSON Lines / .jsonl) lists many JSON records one per line, which suits streaming reads and appended logs without parsing the whole file at once.

Is my data uploaded when validating?

No. Line-by-line parsing happens in a Web Worker inside your browser with no server involved, which you can confirm in the Network panel.

How large a log file is supported?

Ordinary sizes complete instantly; a 10 MB file is typically processed in the Worker within a second without freezing the interface.

Is it free, and do I need to log in?

It is free, with no registration, no usage limits and no ads.

Related tools