Get Started →
Developer Tools

JSON to NDJSON
Converter

The most complete free JSON ↔ NDJSON converter. Convert any JSON array or object into Newline Delimited JSON instantly — with syntax highlighting, live stats, advanced options, line inspector, and one-click download.

Converts JSON arrays → one object per NDJSON line Supports nested objects, mixed arrays, single objects Reverse mode: NDJSON → back to JSON array Sort keys, filter nulls, add _line & _ts metadata Download as .ndjson / .jsonl / .ldjson — 100% in-browser Validate every NDJSON line individually + Diff view
// Conversion Summary
JSON ↔ NDJSON Converter
Output options
Wrap mode
Download as
Input JSON 0 chars
Samples:
NDJSON Output 0 chars
NDJSON output will appear here…
Each line is a valid, standalone JSON object
⚠ Parse Error
Message
Position
Context
Fix hint
NDJSON Format Reference
PropertyValue
MIME typeapplication/x-ndjson
Extensions.ndjson  .jsonl  .ldjson
DelimiterNewline \n (LF, 0x0A)
Each lineValid, complete JSON value
Blank linesAllowed and ignored by parsers
EncodingUTF-8 (required per RFC 8259)
StreamableYes — process one line at a time
AppendableYes — just write a new line to the file
Who Uses NDJSON?
SystemWhy NDJSON / JSONL
ElasticsearchBulk API requires NDJSON format
Google BigQueryJSONL streaming inserts & exports
Apache KafkaCompact, streaming-friendly records
MongoDBmongoimport uses JSONL natively
AWS KinesisJSON-per-record data streams
Apache SparkBuilt-in JSONL reader/writer
jq / grep / awkProcess each record independently
Log pipelinesAppend one line per log event
Command-Line Conversion Reference
ToolJSON → NDJSON commandNotes
jqjq -c '.[]' input.json > out.ndjsonCompact (-c) each array element
Pythonpython3 -c "import sys,json;[print(json.dumps(r)) for r in json.load(sys.stdin)]" < in.jsonWorks on any OS
Node.jsnode -e "JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')).forEach(r=>console.log(JSON.stringify(r)))"Stream-friendly
PHP 8+array_map(fn($r)=>print(json_encode($r)."\n"), json_decode(file_get_contents('in.json'),true));One-liner CLI
NDJSON→JSONjq -s '.' input.ndjson > output.jsonSlurp all lines into array
Elasticsearchcurl -X POST "es:9200/_bulk" -H 'Content-Type: application/x-ndjson' --data-binary @data.ndjsonBulk ingest API

What Is NDJSON and Why Does It Matter?

NDJSON — Newline Delimited JSON — is a text format where every line is a standalone, valid JSON value. Unlike standard JSON arrays that must be fully downloaded and parsed before any record is accessible, NDJSON allows you to process data line by line, enabling true streaming, constant-memory processing, and effortless file appending.

NDJSON vs Standard JSON: Key Differences

Standard JSON stores records inside a single top-level array, requiring the entire document to be loaded into memory at once. NDJSON gives each record its own line, so systems can begin processing the first record while the rest of the file is still being downloaded or generated.

  • Streaming: Read and process records one line at a time — no full file load required.
  • Appending: Adding new records is as simple as writing a new line — no restructuring needed.
  • Partial reads: grep, awk, and jq can filter specific records without reading the whole file.
  • Compression: NDJSON gzips extremely well due to repeated key patterns across lines.
  • Error isolation: A corrupted line affects only that record, not the entire dataset.

NDJSON vs JSONL vs LDJSON

All three names refer to the exact same format: one complete JSON value per line. .ndjson is common in Node.js and Elasticsearch communities. .jsonl (JSON Lines) is preferred by Google BigQuery, Python's jsonlines library, and Apache Spark. .ldjson (Line Delimited JSON) appears in some older data pipelines. Choose the extension your target system expects — the content is identical.

When Should You Convert JSON to NDJSON?

  • Preparing data for Elasticsearch Bulk API indexing
  • Uploading records to Google BigQuery via streaming inserts or batch JSONL load jobs
  • Feeding records into Apache Kafka or AWS Kinesis topics
  • Importing data into MongoDB using mongoimport --type json
  • Processing large datasets with jq, Python, or Apache Spark
  • Building log ingestion pipelines where each event is appended as a new line

Is This Tool Private and Free?

Yes — completely. All JSON to NDJSON conversion logic runs entirely in your browser using JavaScript. No data is ever sent to any server. You can safely convert confidential payloads, API responses, and production data without any privacy concern. The tool also works offline once the page is loaded.

Frequently Asked Questions

What is NDJSON?
NDJSON (Newline Delimited JSON) is a text format where each line is a complete, valid JSON value. It is widely used in data pipelines, streaming systems, and log processing because each record can be read independently.
What is the difference between NDJSON and JSONL?
They are the same format. JSONL (JSON Lines) is the name used by BigQuery and Python libraries; NDJSON is preferred in the Node.js and Elasticsearch ecosystems. File content is identical.
Can I convert a single JSON object to NDJSON?
Yes. A single JSON object outputs as one NDJSON line. A JSON array produces one line per element. Use "Wrap object in array" mode to force a single object into a one-element array output.
How do I convert NDJSON back to JSON?
Use the "NDJSON → JSON" toggle. Paste your NDJSON and click Convert — all lines are wrapped into a valid JSON array. With jq: jq -s '.' file.ndjson
Does Elasticsearch require NDJSON?
Yes — the Elasticsearch Bulk API requires NDJSON. Each document must be preceded by an action metadata line. This tool generates the document lines; you pair them with action metadata.
Is my data sent to your servers?
No. Everything runs in your browser. Nothing is transmitted. The tool is fully private and also works offline after the page has loaded.

More Free Online Tools

Simple tools. Surgical fixes. Zero friction.

Amazon Connect CCP Log Parser

Parse Amazon Connect CCP logs into structured, searchable diagnostics.

Open

Amazon Connect CTR Parser

Turn raw Amazon Connect CTR JSON into a rich visual breakdown.

Open

Amazon Connect Agent Workstation Validator

Pre-flight check for Amazon Connect softphone agents.

Open

CloudTrail Log Analyser

Security audit & threat detection for AWS environments.

Open

Amazon Connect Pricing Calculator

Instantly estimate monthly AWS Connect costs — voice, chat, email, campaigns, telephony & more.

Open

Connect CloudWatch Log Analyzer

Drop any Amazon Connect CloudWatch log and get a rich visual breakdown.

Open