Tools

JSONL Validator

Check fine-tuning and batch JSONL files line by line

Files never leave your device. Datasets are checked in your browser.

Drop a .jsonl file, or paste lines below

How to validate a JSONL file

  1. Drop your .jsonl file or paste the lines. Each line must be one complete JSON object.
  2. The format is detected automatically: chat fine-tuning data with a messages array, OpenAI Batch API requests, or prompt/completion pairs. You can also force a format or check plain JSON only.
  3. Errors are listed by line number with a plain explanation: broken JSON, missing roles, empty content, missing assistant replies, duplicate batch IDs and more.
  4. Download only the valid lines, or convert the file to a normal JSON array.

Why JSONL files fail

JSON Lines (also called NDJSON) stores one JSON object per line, which makes huge datasets easy to stream and append to. It is the standard upload format for fine-tuning language models at OpenAI, Mistral, Together and others, for OpenAI's Batch API, and for many evaluation and embedding pipelines. Uploads are often rejected for small reasons: a stray blank line, a line broken across two lines by a text editor, a single quote instead of a double quote, a role misspelled as "bot", or an example that has no assistant reply to learn from.

This validator checks syntax line by line, so one bad line does not hide the others, and then checks the structure expected by each format. Token counts are estimated at about four characters per token to help you budget training costs; use our Token Counter for exact numbers on samples. Provider requirements change, so also review the latest documentation for limits such as the minimum number of examples. The file is processed entirely in your browser, which matters because training data often contains private conversations.

What is the difference between JSON and JSONL?

JSON is usually one document, such as an array of objects. JSONL puts each object on its own line with no surrounding array or commas between lines.

What format does OpenAI fine-tuning need?

For chat models, each line is an object with a "messages" array of system, user and assistant messages, ending with the assistant reply to learn.

Can I fix invalid lines automatically?

Download the valid lines only, then fix the listed lines by hand. Automatic repair could silently change your data.