~/jsonl · runs in your browser

JSONL fine-tuning validator

Check a chat training file before you upload it. Find the exact line with a problem, see warnings, and count tokens per example and in total. Your file never leaves your browser.

Your file is checked in your browser and is never uploaded. Token counts cover message text only; chat formatting adds a few tokens per message that this tool does not include, so confirm totals with your provider before training.
01

How to use it

  1. Paste your JSONL into the box above, or press Open a file… to load a .jsonl file from your computer. Press Try an example to see the kinds of problems it finds.
  2. Choose the tokenizer for your target model and, if you like, a token limit per example to warn about.
  3. Press Check the file. You get a verdict, the number of valid examples, and a list of errors and warnings with line numbers.
  4. Fix the lines it points to, check again, and use the token totals to estimate the size and cost of your training run.

Read the guideThe chat fine-tuning JSONL format explained: messages and roles, common errors, how many examples to use, counting tokens, and a free validator for the broken line.

How to prepare a JSONL file for fine-tuning
02

What the validator checks

A fine-tuning file for chat models is JSON Lines: one complete JSON object per line, with no blank lines. In the chat format, each object has a messages list, and each message has a role (such as system, user or assistant) and some content. A single stray comma, an unquoted key or a blank line in the middle can make an upload fail, and the error message often does not say which line is at fault.

This tool reads every line and reports, with the line number: invalid JSON, lines that are not objects, a missing or empty messages list, unknown or missing roles, missing content, and the older prompt and completion format. It also raises warnings for things that are legal but worth a second look: an example with no assistant reply, an example that does not end with one, a system message that is not first, duplicate examples, and files with very few examples.

03

Token counts for planning

The tool also counts tokens in each example using OpenAI's real tokenizers and shows the total, the average, the median and the largest example. Training cost is usually based on the number of tokens in your file, so the total helps you estimate a run, and the largest example tells you whether anything is close to a model's per-example limit. Enter a limit in the optional field to be warned about the examples above it.

Counts cover the text of the messages only. Chat formatting adds a few tokens per message that this tool does not include, and other providers tokenise differently, so confirm totals with your provider before you start. Rules, limits and pricing change; check your provider's current fine-tuning documentation. To turn tokens into a cost estimate, use the token calculator, and see the guide to preparing a JSONL file for fine-tuning.

04

Private by design

Training data is often confidential: support conversations, internal documents, customer text. The file is read and checked entirely in your browser. It is never uploaded, and nothing is stored. For very large files, open the file instead of pasting it, and the tool checks it straight from memory.

FAQ

Frequently asked questions

What format does a chat fine-tuning JSONL file need?

One JSON object per line, each with a "messages" list of objects that have a "role" (system, user, assistant, and so on) and "content". There are no blank lines and no commas between lines. Check your provider's current documentation for exact requirements.

Why does my upload fail with a vague error?

The usual causes are a line that is not valid JSON, a blank line, a message without a role or content, or the old prompt and completion format. This tool lists the line number and the reason for each, so you can fix them before uploading.

How many examples do I need?

Providers typically ask for a small minimum (at least 10 examples for OpenAI at the time of writing) and recommend many more for good results. The tool warns when the file has fewer than 10 valid examples; confirm the current minimum in your provider's documentation.

Are the token counts exact?

They are exact for the text of the messages with the OpenAI tokenizer you choose. Chat formatting adds a few tokens per message that are not included, so the total is a close lower estimate, not a bill.

Is my training data uploaded?

No. The file is checked in your browser and never leaves your device. The tokenizer vocabulary is downloaded once.

Does it validate tool calls or images?

It accepts assistant messages with tool calls and message content given as a list of parts, and counts the text in them. It does not check every provider-specific field, so treat it as a first pass before the provider's own validation.

More tools

Related tools

Share this tool