Fine-tuning JSONL validator
Check an OpenAI chat fine-tuning file line by line before you upload it, and see its token counts and what training will bill.
Input
Result
The result will appear here.An OpenAI fine-tuning job that fails validation, or trains on quietly broken examples, costs time and money. This tool runs the checks from OpenAI's own data-preparation notebook (openai/openai-cookbook, MIT) on your JSONL file — one chat example per line — and extends them to the parts of the format the notebook predates: tool calls, image content parts and per-message weights. You get every error with its line number, the notebook's token statistics, the number of epochs the API will choose by default, and how many tokens training will bill.
How it works
- Each line must be a JSON object with a messages array; roles must be system, user, assistant, tool or function, and every example needs at least one assistant message to learn from.
- It checks what upload validation rejects: unknown keys, empty content, weight other than 0 or 1 or on a non-assistant message, tool calls without an id, name or JSON arguments, and tool replies whose tool_call_id answers no earlier call.
- It also recognises files in the wrong format altogether — the legacy prompt/completion layout and preference (DPO) data — and says so instead of listing hundreds of errors.
- Tokens are counted with the notebook's formula over o200k_base; examples longer than the token limit are flagged because training truncates them, and billed tokens are the truncated total times the default epochs.
Where your data goes
Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.
This tool is free and needs no account. Its results exist only in your open page and are not saved anywhere.
What it costs
This tool is free, with no sign-in and no points.
Common questions
- How many examples do I need?
- The API refuses fewer than 10. OpenAI suggests starting with 50 to 100 well-chosen examples and adding more only if the results improve. The default epoch count adapts to the file size: 3 for most files, more for very small ones (up to 25) and fewer for very large ones, which is the rule this tool applies.
- What does the token limit setting do?
- It is the longest example the base model can train on; OpenAI documents 65,536 tokens for gpt-4o and gpt-4o-mini, which is the default here. Longer examples are cut to the limit during training, so their end, often the assistant's answer, is lost. Set the limit your chosen model documents.
- Will my token count match OpenAI's exactly?
- Closely but not always exactly: the per-message overhead in the notebook's formula is an approximation, and tool definitions are counted as their JSON text. Use it to find oversized examples and to estimate cost; the job's own trained-token figure is the final word.
- Does it check DPO or reinforcement fine-tuning files?
- No. It validates the supervised chat format. A preference file with preferred_output and non_preferred_output is detected and reported as such, so you know why every line fails, but its own structure is not checked.
The open-source behind it
This tool is a self-contained implementation. openai/openai-cookbook (MIT) does the same job as a library — if you need this behaviour inside your own program, start there rather than calling a web page.
openai/openai-cookbookAlso known as
- jsonl validator
- openai fine tuning validator
- fine-tuning data format
- chat fine tuning jsonl
- validate training data
- fine tuning token count