Fine-tuning JSONL validator

Check a training file before you upload it, not after the job fails: broken lines, roles no trainer accepts, examples with nothing to learn from, duplicates, and roughly how many tokens each example costs.

Sign in to save this tool
Examples5messages (chat)
Valid32 with errors
Warnings2worth a look
Duplicates1same content
Tokens≈ 140one pass over the set
Per example (median)≈ 437 to 47

Paste your training file: one JSON object per line.

or drop it here

Longer examples are errors; above three quarters of the limit is a warning.

The cleaned file drops

2 of 5 lines would be kept, one compact JSON object per line.

Line by line

2 lines would fail the upload.

Show

Roles used: system 3 · user 5 · assistant 3

  • Line 1 messages (chat) · ≈ 43 tokens

    OK {"messages":[{"role":"system","content":"You answer support questions in the customer's language."},{"role":"user","cont

  • Line 2 messages (chat) · ≈ 47 tokens

    OK {"messages":[{"role":"system","content":"You answer support questions in the customer's language."},{"role":"user","cont

  • Line 3 messages (chat) · ≈ 43 tokens

    Warning: duplicate of line 1

  • Line 4 messages (chat) · ≈ 7 tokens

    Error: no assistant message, so the example has nothing to learn from

    Warning: message 2 repeats the "user" role; most trainers expect turns to alternate

    Warning: does not end on an assistant turn; the last turn is what gets learned

  • Line 5 unrecognised · ≈ 0 tokens

    Error: invalid JSON: Unterminated string

Token counts are an estimate (about ±20%). For a training bill, multiply the total by your provider’s training rate and by the number of epochs.

How to use it

  1. Paste your JSONL training data, or open a .jsonl file. A sample with typical mistakes is loaded to start with.
  2. Set the context limit per example if your model’s limit differs from 128,000 tokens.
  3. Read the summary, then filter the line list to errors, warnings or duplicates. Each issue names the line and the message number.
  4. Choose what the cleaned file drops (lines with errors, duplicates) and download or copy it.

Supported formats and limits

  • Files up to 20 MB of UTF-8 text; pasted text up to 5,000,000 characters. Files over 1,000,000 characters are checked but not shown in the edit box.
  • Recognises the chat messages format (system, user, assistant, plus tool, function and developer as warnings) and the legacy prompt/completion format. conversations and text lines are counted but not checked in depth.
  • Token counts are an estimate by script (about ±20%), not a specific model’s tokenizer.
  • The line list shows the first 500 lines of the chosen group; the summary and the cleaned file always cover every line.
  • Duplicates are found by identical text content (whitespace ignored), not by near-duplicate similarity.

Examples

  • Catching the one malformed line out of 10,000 that would make an OpenAI fine-tuning upload fail.
  • Removing examples that were exported twice before training.
  • Checking that every example ends on an assistant turn after a data-cleaning script.

Frequently asked questions

Why did my fine-tuning upload fail?

Usually because of one line out of thousands: a line that is not valid JSON or not an object, an empty messages array, a missing or unknown role, empty content, or an example with no assistant turn. This page lists each one with its line number.

What is the difference between an error and a warning here?

An error stops the upload. A warning is something providers disagree about, such as tool or developer roles, two turns from the same role in a row, an example that does not end on an assistant turn, or a very short example.

Why do duplicate examples matter?

A duplicated example is trained on twice, which quietly doubles its weight. Duplicates usually come from re-running an export script, so they are found by content, not by line number.

Is my training data uploaded anywhere?

No. The file is read and checked inside your browser tab and nothing is sent to a server.