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
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.
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. Your JSONL data is never uploaded to any server, ensuring complete privacy and security. Perfect for sensitive or proprietary data.
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
Works after first page load
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 lines = fs.readFileSync(
"data.jsonl", "utf8"
).split("\n");
lines.forEach((line, i) => {
try {
JSON.parse(line);
} catch (e) {
console.error(`Line ${i+1}:`, e);
}
});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?
Yes, completely. This validator runs 100% in your browser using JavaScript. Your data is never sent to any server. You can even use it offline after the first page load.
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.