JSONL Validator β Validate Newline-Delimited JSON Files Free in Your Browser
Validate JSONL (JSON Lines) files line by line. Instant error reporting, no uploads, works offline. Perfect for AI training data and log file validation.
JSONL (JSON Lines, also known as NDJSON β Newline-Delimited JSON) is a simple format where each line of a file is a valid JSON object. Itβs the format used by OpenAI for fine-tuning training data, by many logging systems, and by streaming APIs. SimpleTools JSONL Validator validates your JSONL files line by line β entirely in your browser.
What Is JSONL?
JSONL files look like this:
{"role": "user", "content": "What is the capital of France?"}
{"role": "assistant", "content": "The capital of France is Paris."}
{"id": 1, "name": "Alice", "score": 95.5}
{"id": 2, "name": "Bob", "score": 87.0}Each line is a self-contained JSON object. The format is:
- Streamable: You can process one line at a time without parsing the entire file
- Appendable: Add new records by appending lines without rewriting the file
- Human-readable: Each record is on its own line, making it easy to inspect
Where Is JSONL Used?
- OpenAI fine-tuning: Training datasets must be in JSONL format with specific message structure
- Log aggregation: Systems like Elasticsearch, Splunk, and Fluentd use JSONL for log streaming
- Data pipelines: Large datasets are often distributed as JSONL for efficient streaming processing
- API streaming responses: Some APIs stream JSONL one object per line
- ML training data: Many machine learning frameworks support JSONL for training datasets
Why Validate JSONL Before Using It?
A single invalid line in a 100,000-line JSONL file can:
- Cause an entire OpenAI fine-tuning job to fail
- Break a data pipeline at an unexpected point
- Produce cryptic error messages that are hard to debug
Validation catches errors like:
- Malformed JSON syntax on a specific line
- Missing required fields for OpenAI chat format
- Unexpected data types
- Encoding issues
Why Use a Browser-Based Validator?
JSONL files for AI training often contain proprietary prompts, conversation data, or business logic. Uploading them to a third-party service risks:
- Your training data being used for other purposes
- Confidential prompts being exposed
- Privacy violations for any user data in the file
β
Your data files never leave your browser
β
Works with large files using streaming line-by-line parsing
β
Works offline β validate without internet
β
Free with no account required
How It Works
The validator processes the file using the FileReader API, reading it in chunks:
- The file is read as text using
FileReader.readAsText() - The text is split on newlines (
\n) - Each non-empty line is passed through
JSON.parse() - Any line that throws is recorded as an error with its line number and error message
- For OpenAI format validation, additional schema checks are applied (presence of
messagesarray, valid roles, etc.) - A summary is displayed: total lines, valid lines, error lines, with each error listed with its line number
How to Use the JSONL Validator
- Go to simpletools.one/jsonl-validator
- Click Choose File and select your
.jsonlfile, or paste JSONL text directly - Choose validation mode: Basic JSON or OpenAI Chat Format
- Click Validate
- Review the results β errors are listed with line numbers and descriptions
- Fix errors in your source data and re-validate
OpenAI Fine-Tuning Format Requirements
For OpenAI fine-tuning, each line must follow this structure:
{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is 2+2?"},
{"role": "assistant", "content": "4"}
]
}The validator checks:
- Each line is valid JSON
- Each object has a
messageskey messagesis an array- Each message has
roleandcontentstrings roleis one of:system,user,assistant- The conversation ends with an
assistantmessage
Validate your JSONL files at simpletools.one/jsonl-validator β private, instant, and free.