Chat Dataset Validator

Paste your dataset to inspect its structure and approximate text-token size. These checks do not guarantee acceptance by a training provider.

Runs locally in your browser
Dataset rows are parsed only in this browser. The validator does not upload training data or claim provider-specific acceptance.
JSONL dataset

Validate structure before uploading training data

This provider-neutral check covers JSONL syntax, roles, content, assistant examples, duplicates and approximate size. Always run the target provider’s current validation and policy checks before creating a job.

How to validate a chat or prompt/completion JSONL dataset

Paste JSONL where every line is one training record: either a chat object with a messages array, or a prompt/completion pair. The validator reports malformed lines with their line numbers, flags duplicate records, estimates the text token size of the set, and copies back only the rows that passed.

Checking runs in this browser tab. The dataset is never uploaded, and the tool still works offline once the page has loaded.

  1. Paste your JSONL into the editor — one JSON object per line — or press Load example to start from three known-good records.
  2. Press Validate dataset. Empty input is reported before any parsing starts.
  3. Read the Findings list: each problem names its line number, and a record leaves the normalized output only for errors, not for warnings.
  4. Press Copy normalized JSONL to take the valid rows out, compacted to one object per line.
  5. Press Clear to empty the editor and reset the counters before the next dataset.

What the validator checks, line by line

Accepted record shapes

A record with a messages array must contain at least one entry; each entry needs a role of system, developer, user, assistant or tool, and content that is either a non-empty string or an array of {type:"text",text} parts whose text joins to something non-empty. A record with prompt and completion must set both to non-empty strings. A line that is neither shape is reported as an unknown schema.

Records missing an assistant turn are kept in the output but flagged with a warning, and duplicate detection compares records by a canonical form with sorted keys — the same content with reordered keys still counts as a duplicate. In testing, every shape above validated as expected, including array content and the tool and developer roles.

How token estimates are calculated

Token counts are an estimate, not a tokenizer run: the tool divides non-CJK characters by four, counts CJK characters at about one token each, and rounds up. It is the same heuristic used across the AI-lab pages, useful for planning rather than exact billing.

Errors, warnings and duplicates are counted separately in the metrics row. A duplicate is only a warning, so duplicated rows stay in the copied output — pair the copy step with the Findings list when you want them removed.

Limits and practical notes

Validation is structural: it does not know a provider's exact schema, so a dataset that passes here can still be rejected by a specific fine-tuning API. Always run the target provider's current validation and policy checks before creating a job.

The whole file is parsed in one pass; 2000 records checked in a few hundred milliseconds in testing, so multi-megabyte sets usually work, and much larger ones are better handled by a local command-line pipeline. CRLF line endings and a leading byte-order mark are accepted.

Recent tools: