NDJSON Validator - Validate Newline Delimited JSON Data Line by Line
Free online NDJSON validator that checks each line of your NDJSON/JSON Lines data for valid JSON syntax. Get detailed error messages, type detection, and a full validation report.
Validate NDJSON specification compliant data and JSON Lines format as defined by RFC 8259. Uses the browser's built-in JSON.parse() for reliable parsing. Check output from Elasticsearch Bulk API and Google BigQuery exports.
How to Validate NDJSON Data
Check each line of your Newline Delimited JSON for valid syntax, data types, and structure
Input Your NDJSON Data
Paste your NDJSON data into the editor. Each line should be a valid JSON value — an object, array, string, number, boolean, or null. The validator checks every non-empty line independently using JSON.parse().
Example: NDJSON Input with Mixed Valid and Invalid Lines
Real-world data often contains errors — paste it in to find exactly which lines are problematic:
{"event":"login","user_id":"u_001","timestamp":"2024-01-15T10:00:00Z"} {"event":"view","user_id":"u_002","timestamp":"2024-01-15T10:01:00Z"} {event: "purchase", user_id: "u_001", amount: 49.99} {"event":"logout","user_id":"u_002,"timestamp":"2024-01-15T10:05:00Z"} {"event":"signup","user_id":"u_003","timestamp":"2024-01-15T10:06:00Z"}
Lines 3 and 4 are invalid — line 3 uses unquoted keys, line 4 has an unterminated string value.
Review Validation Results
The validator checks each line individually using the JSON RFC 8259 standard and provides a detailed report:
Example: Validation Results
Each line shows status, type, and any error message — making it easy to locate and fix problems:
✓ Line 1 valid type: object ✓ Line 2 valid type: object ✗ Line 3 invalid Unexpected token e in JSON at position 1 ✗ Line 4 invalid Unterminated string in JSON at position 36 ✓ Line 5 valid type: object Summary: 5 lines — 3 valid, 2 invalid
Export Validation Report
Share your validation results or use them to drive data quality decisions:
What is NDJSON Validation?
NDJSON validation checks that each line of a Newline Delimited JSON file is syntactically valid JSON as defined by RFC 8259. Unlike standard JSON validation, NDJSON validation processes each line independently — a single invalid line does not invalidate the entire file.
Validation is critical when working with data from the Elasticsearch Bulk API, Google BigQuery exports, MongoDB mongoexport output, and structured logging systems. These pipelines can produce corrupted or partial lines during network timeouts or write errors, making pre-validation essential before ingestion.
The validator uses the browser's native JSON.parse() for maximum accuracy, following the same parsing rules as the JSON Lines specification. All processing runs entirely in your browser — your data is never sent to any server.
Frequently Asked Questions
What makes NDJSON valid?
Each non-empty line must be a valid JSON value — an object, array, string, number, boolean, or null as defined by RFC 8259. Empty lines are skipped. Unlike standard JSON, there are no commas between lines and no wrapping array brackets.
What are common NDJSON errors?
Common errors include trailing commas in JSON objects, unquoted property names, single-quoted strings (JSON requires double quotes per the NDJSON spec), unterminated strings, and accidentally including array brackets or commas between lines.
Does each line have to be an object?
No. While most NDJSON files contain objects (one per line), the JSON Lines format allows any valid JSON value on each line — arrays, strings, numbers, booleans, and null are all valid.
Can I fix invalid lines after validation?
Yes. After identifying which lines have errors, edit them directly in the input editor. The validator re-runs automatically so you can verify your fixes in real time. Once all lines are valid, convert using NDJSON to JSON, NDJSON to CSV, or NDJSON to Table.
Which services commonly output NDJSON that may need validation?
The Elasticsearch Bulk API, Google BigQuery JSON exports, MongoDB mongoexport, Apache Kafka consumers, structured logging libraries (Pino, Bunyan, Winston), and AWS CloudWatch log exports all produce NDJSON that may contain partial or malformed lines.
What happens to empty lines?
Empty lines are automatically skipped during validation, as per the NDJSON specification. Only non-empty lines are parsed and included in the validation report and summary counts.
Is this validator free?
Yes, completely free with no limits. All processing happens in your browser using the native JSON.parse() API — your data never leaves your device.
Related Tools
NDJSON Viewer
View, validate, and format NDJSON (Newline Delimited JSON) data. Parse each line, detect errors, and convert to formatted JSON arrays.
NDJSON to JSON
Convert NDJSON (Newline Delimited JSON) to a standard JSON array. Transform JSON Lines data into formatted JSON for APIs, databases, and tools.
JSON to NDJSON
Convert a standard JSON array into NDJSON (Newline Delimited JSON) format. Transform JSON data for streaming, logging, and data pipelines.
NDJSON to CSV
Convert NDJSON (Newline Delimited JSON) to CSV format. Transform JSON Lines data into spreadsheet-compatible CSV with automatic header detection.
NDJSON to Table
Convert NDJSON (Newline Delimited JSON) to a readable HTML table. Visualize JSON Lines data in rows and columns with color-coded types and CSV export.
NDJSON to YAML
Convert NDJSON (Newline Delimited JSON) to YAML format. Transform JSON Lines data into clean, human-readable YAML.