JSONL Validator
Validate your JSON Lines data instantly - 100% client-side, secure, and fast. Check syntax, detect errors, and ensure data integrity.
{"id":1,"name":"Alice","valid":true}New: Auto-fix expanded to 10 strategies covering all common JSONL mistakes, plus CSV export, JSON Schema validation, and real-world examples. See common JSONL mistakes
Validate Your JSONL or NDJSON File
Drag & Drop Your JSONL File
or
Supports: .jsonl, .ndjson, .json, .txt
Load Example JSONL Data
Real-World Examples
Import JSONL from URL
The remote server must allow CORS requests. Data is fetched directly by your browser.
Validation Options
Total Lines
0
Valid Lines
0
Error Lines
0
Success Rate
0%
Error Details
Warnings
Pretty Print Output
Table View
Validator Features
100% Client-Side
Your data never leaves your browser. All validation happens locally for maximum security and privacy.
Lightning Fast
Validate thousands of lines instantly with optimized JavaScript parsing and error detection.
Detailed Error Reports
Get precise line numbers, error types, and helpful messages to fix issues quickly. Every message it reports is explained in the error dictionary.
Schema Consistency
Optionally check that all records have consistent field names for data integrity.
Duplicate Detection
Find duplicate ID values across your dataset to ensure data uniqueness.
Auto-Fix Engine
10 fix strategies automatically repair common mistakes: bad quotes, trailing commas, comments, BOM markers, and more.
How It Works
Input Your Data
Paste JSONL text, upload a file, or load an example dataset to begin validation.
Line-by-Line Parsing
Each line is parsed independently as JSON, catching syntax errors with precise line numbers.
Advanced Checks
Optional schema consistency and duplicate ID detection run on valid records.
Get Detailed Results
Review statistics, error details, and download clean data or error reports.
Your Data Stays Private
This validator runs 100% in your browser using JavaScript. Parsing, schema checks, conversion and auto-fix all happen in this tab, and validating sends no network request. Your JSONL data is never uploaded to any server.
One caveat, stated plainly. So your work survives an accidental refresh, the input box and your checkbox settings are saved to this browser's localStorage, which means a copy sits on your own disk until you remove it. That copy is never transmitted anywhere, but it is not encrypted either. To remove it, empty the input box (which overwrites the saved copy) or clear this site's stored data in your browser settings. Do that before handing the machine to someone else if the data is sensitive. Our privacy policy states this in writing and lists the analytics the rest of the site uses.
Why Choose Our Validator
| Feature | JSONL.rest Validator | Other Validators |
|---|---|---|
| Client-side privacy | Yes | No |
| Line-by-line parsing | Yes | No |
| Schema consistency check | Yes | No |
| Duplicate ID detection | Yes | No |
| Auto-fix (10 strategies) | Yes | No |
| File upload & drag-drop | Yes | Yes |
| Export valid lines | Yes | No |
| Free, no signup | Yes | Yes |
Lines validated in under 1 second
Server round-trips required
Validating sends no network request once the page has loaded
Limitations
Where this tool stops, and what to reach for instead.
Table View shows the first 100 rows
Table View renders at most 100 rows no matter how many valid lines your file has, and each cell is truncated at 50 characters. Validation itself still covers every line, so the summary counts and the error list are complete even when the table is not. Use Download Valid Lines or Download CSV to get the full data.
Error lines are truncated at 200 characters
When a line fails to parse, the report echoes the first 200 characters of it and tells you how many characters were held back. The line number and the parser message are always exact, so a very wide record still points you to the right place in your editor.
JSON Schema support is a subset
The optional schema check reads three keywords: type (including integer), required, and properties one level deep. It does not implement $ref, enum, pattern, items, or schemas nested inside properties. Unsupported keywords are ignored rather than reported, so a clean result here is not proof of full schema conformance. For that, run a complete validator such as Ajv or jsonschema - the schema validation guide covers both, plus how to apply a schema per line and enforce it in CI.
Very large files will freeze the tab
There is no file-size cap and no Web Worker. The whole file is read into a single string and parsed on the main thread, so the tab stops responding for as long as that takes and a file large enough to exhaust memory will kill it outright. Multi-gigabyte logs and exports belong in a streaming tool: jq for line-by-line checks, or DuckDB to query the file directly.
Auto-Fix is a heuristic, one line at a time
Auto-Fix guesses at the intent of a broken line and cannot repair a JSON value split across several lines. It will not silently drop anything: a line holding several values run together is split into one line per value, and if any of those values cannot be made valid on its own the fix is refused with a warning instead of applied. Always re-validate after a fix, and diff the result before you overwrite the original file.
Trusted for Validating Data Used With
Built for Your Workflow
OpenAI Fine-Tuning
Validate chat and completion format before uploading training data.
Elasticsearch Bulk
Verify bulk indexing payloads before sending to your cluster.
BigQuery Export
Check schema consistency in JSONL exports from BigQuery.
Kafka Messages
Validate JSONL message payloads for streaming pipelines.
Validate JSONL in Your Language
Python
import json
with open("data.jsonl") as f:
for i, line in enumerate(f, 1):
try:
json.loads(line)
except json.JSONDecodeError as e:
print(f"Line {i}: {e}")Full Python guideNode.js
const fs = require("fs");
const readline = require("readline");
// Stream: never loads the file into memory
const rl = readline.createInterface({
input: fs.createReadStream("data.jsonl"),
crlfDelay: Infinity
});
let n = 0;
rl.on("line", (line) => {
n++;
if (!line.trim()) return; // blank/trailing line
try {
JSON.parse(line);
} catch (e) {
console.error(`Line ${n}:`, e.message);
}
});Full Node.js guidejq (CLI)
# Validate each line
jq -e . data.jsonl > /dev/null
# Count valid lines
jq -e . data.jsonl 2>/dev/null \
| wc -l
# Pretty-print first line
head -1 data.jsonl | jq .Full jq guideFrequently Asked Questions
What is a JSONL validator?
A JSONL validator checks that each line of a JSON Lines file contains valid JSON syntax. It parses every line independently and reports any syntax errors with line numbers and explanations.
Is my data safe when using this validator?
Your data is never sent to any server. This validator runs entirely in your browser using JavaScript, and validating makes no network request once the page has loaded. Note that your input is cached in this browser's local storage so it survives a reload, which means an unencrypted copy stays on your own device until you clear the input or clear this site's stored data.
What file formats does the validator support?
The validator accepts .jsonl, .ndjson, .json, and .txt files. You can also paste text directly or import from a URL. Any text file with one JSON value per line works.
How large of a file can I validate?
The validator handles files with 100,000+ lines in under a second. Performance depends on your browser and device, but most modern browsers handle several megabytes easily.
Can this validator check OpenAI fine-tuning data?
Yes. Enable the "OpenAI Format" checkbox in Validation Options. It checks both chat format (messages with role/content) and completion format (prompt/completion pairs) against OpenAI requirements.
What is the difference between JSONL and NDJSON?
JSONL (JSON Lines) and NDJSON (Newline Delimited JSON) are the same format - one valid JSON value per line, separated by newline characters. This validator works with both.
Can the validator fix errors automatically?
Yes. Each error includes a "Try Auto-Fix" button with 10 fix strategies covering all common JSONL mistakes: stripping comments, removing array wrappers, replacing single quotes, quoting unquoted keys, removing trailing commas, replacing JavaScript literals (undefined/NaN/Infinity), closing missing braces, splitting concatenated objects, removing invisible characters, and stripping BOM markers.
How do I convert JSON to JSONL?
Paste your JSON array into the text area and click the "JSON to JSONL" button above it. Each element of the array becomes a separate line. You can also convert JSONL back to a JSON array.
Does it work with real-time validation?
Yes. Enable the "Real-Time" checkbox in Validation Options and the validator will check your data as you type with a short delay, giving you instant feedback.
Can I view my data in a table format?
Yes. After validating, click the "Table View" button to see your valid records displayed in a sortable table with columns based on the keys in your data. Up to 100 rows are shown.