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 in, JSON out
A small sample to show the shape of the conversion. Pretty-printed output, types preserved where possible.
{"id":1,"name":"Alice"}
{"id":2,"name":"Bob"}[
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]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.
How to convert NDJSON to JSON
Paste your NDJSON
Drop your source into the left editor. The sample loads on first visit — replace it with your data.
Click Convert
Or leave Auto-convert on for live updates as you type. Conversion runs locally.
Review the output
The right pane shows pretty-printed JSON with status, byte counts, and line count.
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.
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 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
_bulkrequest bodies. - Prepare data dumps for SQL
jsonbingestion.