How to check a JSONL dataset before fine-tuning

A fine-tuning job reads JSONL one line at a time, and one malformed line is enough to fail the upload after you have already paid for the wait. Checking the file first takes seconds.

What actually breaks

A quick manual check

Parsing every line locally catches the first two classes and nothing else.

python3 -c "import json,sys
[json.loads(l) for l in open(sys.argv[1]) if l.strip()]" dataset.jsonl

It stops at the first failure, says nothing about duplicates or overwritten keys, and does not know what a conversational record is supposed to look like.

Checking the whole file at once

The JSONL Dataset Validator reads the dataset line by line and returns every issue it finds with the line number, a stable issue code, and a severity, rather than stopping at the first one. Choose the chat format to add the role and content rules, or leave it generic to check structure only.

It never echoes the content of a record back, so an issue list can be pasted into a ticket without leaking the dataset. One run handles up to 500 records and 48 KB of input, so split a large corpus and validate it in parts.

Reading the result

error
The line will fail or train on something other than what it says. Fix it.
warning
The line is valid but suspicious, such as an unusual role order.
line
The 1-based line in the file you uploaded, so the fix is a direct lookup.

Next