NDJSON Fixer - Repair broken JSON Lines, missing commas and malformed records
Paste broken NDJSON and get a repaired copy back. The NDJSON is sent to our server and fixed by an AI service.
How to Fix NDJSON / JSON Lines Errors - Step by Step Guide
Paste Your Broken NDJSON / JSON Lines Data
Got broken NDJSON or JSON Lines that's failing to parse? This fixer sends your data to our server, an AI service repairs the broken records, and the result comes back in the right editor. After fixing, use our NDJSON validator, NDJSON viewer, or convert NDJSON to JSON. Paste your problematic NDJSON data:
Paste broken NDJSON: Copy error-prone NDJSON from your data pipelines, log files, or streaming output
Repair common errors: The fixer targets missing commas, unquoted keys, trailing commas, and broken JSON objects on each line
Try sample NDJSON: Click "Sample NDJSON" to load broken NDJSON and see the tool in action
Note: very large NDJSON files can take the fixer longer than a minute, after which the request gives up. Split a big file into smaller parts and fix them one at a time.
Example: Common NDJSON / JSON Lines Errors
Here are typical NDJSON syntax errors that break line-by-line parsing:
{"id": 1, "name": "Alice", "email": "[email protected]" "active": true}
{"id": 2, name: "Bob", "email": "[email protected]", "active": false}
{"id": 3, "name": "Charlie", "email": "[email protected]", "active": true,}
{id: 6, "name": "Frank", "email": "[email protected]", "active": true}Send the NDJSON to the Fixer
Click Fix NDJSON!! and the file is sent to our server, where an AI service rebuilds the broken records. If every line already parses as valid JSON, the fixer skips the request and shows your NDJSON back unchanged.
One request per click: nothing is sent while you type or when you load the sample
Values kept as-is: the repaired NDJSON is shown exactly as returned, so long ids, leading zeros and decimals are not re-spelled
Clear errors: if the server is busy or the input is too broken to repair, you get a plain message instead of a half-fixed file
Most Common NDJSON / JSON Lines Errors and How to Fix Them
1. Missing Comma Between Properties
Each JSON property within a line must be separated by a comma.
❌ Wrong:
{"name": "Alice" "age": 30}✅ Correct:
{"name": "Alice", "age": 30}2. Unquoted Keys
JSON requires all keys to be wrapped in double quotes.
❌ Wrong:
{name: "Alice", age: 30}✅ Correct:
{"name": "Alice", "age": 30}3. Trailing Commas in Objects
JSON does not allow trailing commas after the last property.
❌ Wrong:
{"name": "Alice", "age": 30,}✅ Correct:
{"name": "Alice", "age": 30}4. Unquoted String Values
String values must be enclosed in double quotes in valid JSON.
❌ Wrong:
{"email": [email protected]}✅ Correct:
{"email": "[email protected]"}Check and Copy the Fixed NDJSON
The repaired NDJSON appears in the right editor as plain text. Read it before you use it - on badly mangled input an AI service has to guess what you meant, so a quick check is worth it:
Compare line by line: confirm each record is the one you expected and nothing was dropped or merged
Validate if it matters: run the result through our NDJSON validator to confirm every line parses before feeding it into a pipeline
Best Practices for Working with NDJSON / JSON Lines
One JSON Object Per Line:
Each line in an NDJSON file must be a complete, valid JSON object. Never split a JSON object across multiple lines in NDJSON format.
Use Newline as Delimiter Only:
Lines are separated by \n. Do not use commas or other delimiters between records.
Validate Before Streaming:
Always validate NDJSON data before feeding it into streaming pipelines like Kafka, Kinesis, or BigQuery ingest.
Keep Consistent Schema Across Lines:
While NDJSON allows different schemas per line, consistent field names and types across records make data processing simpler and more reliable.
Frequently Asked Questions About the NDJSON Fixer
What is NDJSON and how is it different from regular JSON?
NDJSON (Newline Delimited JSON), also called JSON Lines or JSONL, puts one complete JSON value on each line, separated by newlines. Unlike a single JSON array, an NDJSON file can be read and written one line at a time without loading the whole file into memory, which is why logs, data pipelines and bulk exports use it.
How do I fix broken NDJSON or JSON Lines here?
Paste your NDJSON into the left editor and click Fix NDJSON!!. The file is sent to our server, where an AI service repairs the broken records - missing commas, unquoted keys, trailing commas and the like - and the fixed NDJSON comes back in the right editor. Nothing is sent while you type or when you load the sample.
Is my NDJSON sent to a server?
Yes. When you click Fix NDJSON!!, the NDJSON is sent to our server and repaired by an AI service. If every line already parses as valid JSON there is nothing to fix, so it is shown back unchanged without being sent. The data is processed to produce the fix and nothing is kept once the reply comes back, but leave out anything you would not want to share.
Does the fixer change my numbers or leading zeros?
The repaired NDJSON is shown exactly as the server returned it, as plain text in the right editor. Long id numbers like 8901240544102066246, leading zeros like 00501 and decimals like 14.50 come through unchanged, because the page never re-parses or re-serialises the answer.
Can I trust the fixed NDJSON?
Read it before you use it. The fixer is an AI service: on clearly broken records it usually just repairs the syntax, but on badly mangled input it has to guess what you meant. The page shows the answer as-is without re-checking it, so if the data matters, run it through our NDJSON validator and confirm each line is the record you expected.
What NDJSON errors can it repair?
It targets the syntax problems that break line-by-line parsing: missing commas between properties, unquoted keys and string values, trailing commas, and mismatched brackets or braces. It works through each line so a record on one line can be fixed without affecting the others. Some inputs are too broken to repair reliably - when that happens it says so instead of guessing wildly.
Can it repair JSONL exported from BigQuery or Elasticsearch?
Yes. The fixer takes NDJSON / JSONL from any source - Google BigQuery exports, Elasticsearch bulk output, application log streams and data pipeline output all work the same way. Small to medium files work best; split a very large file into parts and fix them one at a time.
Can I convert fixed NDJSON to other formats like CSV or JSON?
Yes. Once the NDJSON is repaired, send it through our NDJSON to JSON, NDJSON to CSV or NDJSON to YAML converter to turn it into the format you need.
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 Validator
Validate NDJSON (Newline Delimited JSON) data line by line. Check JSON Lines syntax with detailed error messages and type detection.