HCODX/NDJSON to JSON
100% browser-based · UTF-8 safe · No upload

NDJSON to JSON

Convert NDJSON (newline-delimited JSON, also called JSON Lines or .jsonl) into a single JSON array. Each non-empty line is parsed independently and merged into one array — runs locally in your browser.

NDJSON input
JSON output
Conversion options
Reverse (JSON → NDJSON)
Input size
0 B
Output size
0 B
Output lines
0
Status
Ready
Example

NDJSON in, JSON out

A small sample to show the shape of the conversion. Pretty-printed output, types preserved where possible.

NDJSON
{"id":1,"name":"Alice"}
{"id":2,"name":"Bob"}
JSON
[
  { "id": 1, "name": "Alice" },
  { "id": 2, "name": "Bob" }
]
Use cases

What you'll use this for

NDJSON to JSON shows up in every backend and ETL stack — feeding APIs, migrating configs, debugging payloads.

API & data imports

Prepare payloads for REST APIs and ingestion endpoints.

Data migration

Move configuration and tabular data between systems and formats.

Debugging

Inspect production data in a sensible, structured form.

ETL pipelines

Stage transformations between formats in your data flow.

Step by step

How to convert NDJSON to JSON

1

Paste your NDJSON

Drop your source into the left editor. The sample loads on first visit — replace it with your data.

2

Click Convert

Or leave Auto-convert on for live updates as you type. Conversion runs locally.

3

Review the output

The right pane shows pretty-printed JSON with status, byte counts, and line count.

4

Copy or download

Use the action bar to copy to clipboard or save as a file. Or jump to the reverse converter for round-trip checks.

FAQ

Frequently asked questions

Newline-delimited JSON — each line is a complete JSON value. Used in streaming APIs, log files, and bulk-load formats (Elasticsearch, BigQuery, MongoDB Atlas).

Yes, effectively. JSON Lines (.jsonl) is the same format. NDJSON's spec also requires UTF-8 and forbids extra whitespace at line ends.

Yes. Blank or whitespace-only lines are ignored.

Parsing stops and reports the offending line's error so you can fix it.

All parsing happens in your browser. Nothing is uploaded.

About

About NDJSON to JSON

NDJSON is the simplest streaming JSON format: one JSON value per line, separated by \n. It's perfect for log files, streaming APIs, and incremental processing because clients can parse one line at a time without loading the whole document.

How it works

  • Each non-empty line is parsed independently via JSON.parse.
  • Results are collected into a single JSON array.
  • Pretty-printed with 2-space indent.

Use cases

  • Convert logs to a JSON array for ad-hoc tooling.
  • Inspect Elasticsearch _bulk request bodies.
  • Prepare data dumps for SQL jsonb ingestion.
Related

Related tools