JSONL Validator

Validate and inspect JSONL files for AI fine-tuning datasets. Free online JSONL validator for OpenAI, Anthropic and Mistral formats.

Free No signup Runs in your browser
Format
Detected format:

All examples are valid for this format.

Your input stays in your browser — nothing is uploaded to our servers.

Fine-tuning jobs fail on small things: one broken line, an unknown role, an example with no assistant reply. A plain JSON check won’t catch most of them. This validator checks every line of a JSONL file for valid JSON and for the chat format that OpenAI, Mistral or Anthropic fine-tuning expects, and tells you exactly which line is wrong and why.

How to validate a JSONL file

  1. Paste the contents of your .jsonl file, or click Try example to see typical mistakes.
  2. Leave the format on Auto-detect, or pick OpenAI, Anthropic, Mistral or JSON syntax only.
  3. Read the summary (valid lines, errors, warnings) and the list below it. Line numbers match your file, including blank lines.
  4. Fix the errors in your editor and paste again until every line is valid.

What is JSONL, and what do fine-tuning files look like?

JSONL (JSON Lines) stores one complete JSON object per line, with no commas between lines and no surrounding array. That makes large datasets easy to stream and append to, and it is the format most fine-tuning and batch APIs expect.

For chat fine-tuning each line is one training example: an object with a messages array. Each message has a role and content, where content is a string or a list of content parts. The model learns from the assistant messages, so every example needs at least one.

  • OpenAI: roles system, developer, user, assistant and tool; content parts can be text or images; an assistant message may carry only tool calls.
  • Mistral: the same idea with roles system, user, assistant and tool.
  • Anthropic (Claude fine-tuning): the system prompt is a top-level system string; messages only use user and assistant, must start with user, alternate, and end with assistant.

Provider requirements change and some add extra fields (tools, weights, preference data). Treat this check as a fast first pass, then confirm with the provider’s own validator or documentation before uploading a large job.

Frequently asked questions

What is the difference between JSON and JSONL?

A JSON file holds a single value, often one big array. A JSONL file holds one JSON value per line, with nothing between lines. You can read JSONL line by line without loading the whole file, which is why it is used for large datasets.

Why is a blank line reported as a warning?

Many fine-tuning and batch APIs reject a file with empty lines in it, and they are easy to introduce when concatenating files. A newline at the very end of the file is fine and isn’t reported.

How does auto-detect choose the format?

It looks at the first valid line. A top-level "system" string with only user and assistant messages is treated as Anthropic; any other "messages" array as OpenAI; anything else is checked for JSON syntax only. Pick the format manually if the guess is wrong.

Why does an example with no assistant message fail?

In chat fine-tuning the model is trained to produce the assistant turns. An example without one gives it nothing to learn, and providers reject such examples.

Is my training data uploaded?

No. The file is parsed and validated in your browser with JavaScript. Nothing is sent to our servers, which matters for private or customer data.

Related tools