JSONL Validator
Validate JSON Lines and NDJSON files row by row in your browser. Flag broken lines with line numbers, infer the schema, and convert valid records to a JSON array.
Loading tool...
What is JSONL Validator?
A JSONL (JSON Lines) validator that checks NDJSON files row by row, flags broken lines with exact line numbers, infers the schema, and converts valid records into a JSON array β all locally in your browser.
Key Benefits
- Find the exact broken line in seconds instead of scanning thousands of rows
- No data leaves your machine β safe for logs with sensitive fields
- Turn messy JSONL exports into a clean JSON array with one click
- Understand your dataset instantly with inferred field types
- Works offline with files of any size your browser can hold
Common Use Cases
- β’Debugging a failed JSONL import into a database or data warehouse
- β’Checking LLM training data and RAG corpora before preprocessing
- β’Verifying NDJSON logs or event streams after a bad writer deploy
- β’Converting a JSONL export from an API into a JSON array for scripts
How to Use the JSONL Validator
- Paste or upload: Paste your JSONL text into the box, or click Upload file to load a .jsonl, .ndjson, or .txt file.
- Validate: Click Validate. Every non-empty line is parsed and broken lines are flagged with their exact line number and error message.
- Review the summary: Check the counters for total, non-empty, valid, and invalid lines, and expand the schema table to inspect field names and inferred types.
- Export: Copy or download the valid records as a JSON array, or download a plain-text validation report listing every issue.
Key Features
- Row-by-row validation with exact line numbers for every broken record
- Skips blank lines silently and counts total, non-empty, valid, and invalid lines
- Converts all valid records into a pretty-printed JSON array with one click
- Infers the schema (field names and types) from the first 1,000 records
- Upload .jsonl/.ndjson files or paste text β everything stays in your browser
- Download the JSON array or a plain-text validation report with all issues
Frequently Asked Questions
What is the difference between JSON and JSONL?
JSON is a single document, while JSONL (JSON Lines) stores one complete JSON value per line with no commas between lines. JSONL is the standard format for logs, database exports, and streaming pipelines because readers can process one line at a time.
What happens with empty lines in my file?
Empty and whitespace-only lines are skipped silently and do not count as errors. The summary shows both total lines and non-empty lines so trailing newlines never break validation.
Does the validator fix broken lines?
No. It flags every broken line with its line number, the parser error, and a short excerpt so you can fix the source data. Valid records can be exported as a clean JSON array, which effectively strips out the invalid rows.
Is my data uploaded to a server?
No. All parsing happens locally in your browser with JavaScript. Nothing is sent anywhere, making it safe for logs and datasets with sensitive fields.