JSONL Validator
Check OpenAI messages JSONL locally and list the line that failed.
Added 2026-10-24
What it does
JSONL Validator checks OpenAI chat-message JSONL in this tab and names the line that failed. Each non-empty line must be one JSON object with a messages array. Roles can be system, user, assistant, tool, or developer. A training example needs an assistant message. A conversation that only has user or system messages is incomplete. Each message needs a role and content. content may be a string or a list of parts, and it may be null only when tool_calls is present. A tool message also needs tool_call_id. weight, when present, must be 0 or 1. A blank line is an error, because OpenAI reads one object per line. The file is not uploaded, and the fine-tuning API is not called.
How to use it
- One example per line. The object needs a messages array, and one of those messages needs the assistant role.
- A message needs a role and content. content can be a string or a list of parts. It can be null only when tool_calls is present.
- A tool message also needs tool_call_id. weight, when present, is 0 or 1.
Common mistakes
- A blank line is not an example. OpenAI reads one JSON object per line. Delete empty lines instead of leaving them between examples.
- Training examples need an assistant message. A conversation that only has user or system messages is not a complete training example.
The file stays in this tab. It is not uploaded.
Related guides
- One JSON object per JSONL line
OpenAI messages JSONL needs one object per line, a messages array, and an assistant message. A blank line is not an example.