Fine-tuning JSONL Validator
Validate chat-format fine-tuning JSONL line by line: invalid JSON, missing roles, empty content, tool-call arguments and token totals. Nothing is uploaded.
Private by design: everything you enter is processed in your browser. It is not sent to our servers.
How to use
- Paste your JSONL, or choose a .jsonl/.txt file (up to 5,000,000 characters; it is read in your browser).
- Choose how tokens are counted: estimate (characters ÷ 4) or exact o200k_base.
- Read the summary (valid and invalid lines, token total), then the per-line list of errors and warnings with line numbers.
- Fix the lines, paste again, and repeat until no errors remain.
Worked example
Three training examples. The first is fine; the second has a message without a role; the third has an empty assistant answer.
JSONL input
{"messages":[{"role":"system","content":"Be brief."},{"role":"user","content":"2+2?"},{"role":"assistant","content":"4"}]}
{"messages":[{"content":"hi"},{"role":"assistant","content":"hello"}]}
{"messages":[{"role":"user","content":"x"},{"role":"assistant","content":""}]}Result
| Lines / valid / invalid | 3 / 1 / 2 |
|---|---|
| Line 2 | messages[0] is missing "role". |
| Line 3 | messages[1] has empty content. |
| File warning | The file has 3 lines; OpenAI's guide says at least 10 are required. |
| Tokens (estimate) | 9 |
How it works
The checks follow OpenAI’s supervised fine-tuning guide: the file is JSONL (one complete JSON object on every line), each object has a "messages" array of role/content messages, and the file has at least 10 lines. Assistant messages may carry "tool_calls" instead of text, as the guide’s function-calling example shows.
Per line the validator reports: invalid JSON, a line that is not an object, a missing or empty "messages" array, a message that is not an object, a missing role, missing or empty content, tool calls without a function name or with arguments that are not valid JSON, and examples with no assistant message at all. Unknown roles, tool messages without tool_call_id and a final message that is not from the assistant are warnings, not errors.
Token totals add up the text content of every message plus tool-call names and arguments. They use the estimate (characters ÷ 4) or the exact o200k_base count; either way they are approximations of what a particular training service counts, because services add formatting tokens and may use a different tokenizer.
Everything is checked locally. The tool does not call any fine-tuning service, so a file that passes here can still be rejected by a provider for rules this page does not know about (model-specific limits, content checks, size limits).
Common errors
Blank line. JSONL needs one JSON object on every line.- Delete the empty line. A single trailing newline at the end of the file is fine.
Invalid JSON: …- Check quotes, commas and brackets on that line. Each line must stand alone, so a JSON array across several lines will not work.
Missing "messages" array.- Each line should look like {"messages":[{"role":"user","content":"…"},{"role":"assistant","content":"…"}]}.
messages[0] is missing "role".- Add "role": "system", "user", "assistant" or "tool" to the message.
messages[1] has empty content.- Fill in the text, or for an assistant tool call provide tool_calls instead of content.
No assistant message: there is nothing for the model to learn to produce.- Add the assistant reply that the model should learn to give.
Limits
- Only the chat “messages” format is checked. Preference (DPO), reinforcement and legacy prompt/completion formats are not.
- Roles other than system, user, assistant and tool produce a warning because the checked guide does not list them.
- Image content, per-message weights and other optional fields are not validated.
- OpenAI notes that it is winding down its fine-tuning platform for new users, so check that your provider still offers it; this tool validates the format only.
- At most 5,000,000 characters and 100,000 lines are processed; only the first 200 problem lines are displayed.
Privacy
Your training data is read and checked in your browser. It is never uploaded. Files you choose are read locally and not stored. No account is needed, no cookies are set and no analytics run. See thePrivacy Policy. The “Copy share link” button puts your settings after the “#” in the address; browsers do not send that part to servers, and the page’s canonical address never includes it.
FAQ
How many examples do I need?
OpenAI’s guide says the minimum is 10 and that improvements are usually seen from 50 to 100 well-chosen examples; the right number depends on your task.
Why is a file with a tool call and no text allowed?
In OpenAI’s example an assistant message contains tool_calls instead of content. The validator accepts that and checks the call’s arguments are valid JSON.
Are the token counts what I will be billed?
No. They are approximations for planning. Use your provider’s own counting and pricing for billing.
Does this check my data for quality or safety?
No. It checks structure only.
Related
Embed this tool
Paste this snippet into your own page or docs to show the tool inline. The embedded view works the same way (everything runs in the visitor’s browser) and carries a small link back to MakeTools.
Sources
- OpenAI: Supervised fine-tuning guide (JSONL format, 10-line minimum) – checked 2026-10-14
- OpenAI: Pricing page (note about winding down the fine-tuning platform) – checked 2026-10-14
Page last updated 2026-10-14. Written by Prajyot Mulik; see the editorial policy.