Fine-Tuning JSONL Validator
Paste or open a JSONL training file, see which dataset format it uses and every problem with its line number, and convert it to another format.
Last checked
Training data
Report
Paste JSONL, open a file or try the sample. The format, example count, tokens and every issue by line appear here.
Convert format
Reads chat messages, ShareGPT, Alpaca, Gemini, Bedrock and prompt/completion lines.
CSV to chat JSONL
Handles quoted fields, commas, semicolons, tabs and line breaks inside quotes.
Split and cost
Prices differ by model and change over time, so none is filled in. Copy the training price for your model from OpenAI’s pricing page.
- Split
- 0 train, 0 validation
- Training tokens
- No training examples yet
- Estimated cost
- Add a price above
How to use it
- Paste the JSONL text or open the .jsonl file. It is read in the browser and not uploaded.
- Read the summary, then the table: each row gives the line number and what is wrong with it.
- Click a line number to jump to it, fix the lines and check again, or copy the report to share it.
- To move a dataset to another trainer, pick a target in Convert format and download the converted file.
- Optionally set a validation share and seed, enter your model's training price, and download the two split files.
- Starting from a spreadsheet? Paste the CSV in the converter, map the columns and send the result to the validator.
What it checks and why
Fine-tuning datasets are JSONL files: one complete JSON object per line. The shape of each object depends on the trainer. OpenAI and Hugging Face TRL use a messages array in the chat format, OpenAI's preference tuning (DPO) adds preferred and non-preferred outputs, Axolotl and many open datasets use ShareGPT conversations or Alpaca instruction/output pairs, TRL also takes plain text and prompt/chosen/rejected pairs, Gemini tuning on Vertex AI uses contents with parts, and Claude fine-tuning on Amazon Bedrock uses a system string plus messages. A file that breaks its format is rejected after upload, often with a message that names only the first problem. Checking it locally first shows every problem at once.
OpenAI is winding down its fine-tuning platform. Its supervised fine-tuning guide says the platform is no longer open to new users and that eligible existing customers can create training jobs until January 6, 2027, unless the base model shuts down earlier. The chat format it used is the same one Hugging Face TRL and many hosted trainers read, so the checks stay useful for those.
The checks follow OpenAI's cookbook notebook Data preparation and analysis for chat model fine-tuning, which lists the format errors it looks for, and the supervised fine-tuning guide, which sets a minimum of 10 examples. The fine-tuning best practices guide describes the optional weight key on assistant messages: 0 skips that reply in training and 1 keeps it.
A common cause of broken files is a pretty-printed JSON object spread over several lines, or a raw line break inside a string. Each example must sit on a single line, with line breaks inside text written as \n.
OpenAI's fine-tuning jobs accept an optional validation file next to the training file and report validation loss from it. The split here shuffles the lines with a seeded generator, so the same seed and share always give the same two files. Duplicates are worth removing before you split, or the same example can land in both sets.
Training is billed per token trained, which is roughly the tokens in the training file times the number of epochs. Prices vary by model and change, so the tool never fills one in: copy the current training price for your model from OpenAI's pricing page. The result inherits the rough token estimate, so treat it as a ballpark.
Specs and sources
- OpenAI Cookbook: Data preparation and analysis for chat model fine-tuning
- OpenAI: Supervised fine-tuning guide
- OpenAI: Fine-tuning best practices (weight on assistant messages)
- OpenAI: Direct preference optimization guide (DPO data format)
- Hugging Face TRL: Dataset formats and types
- Google Cloud: Prepare supervised fine-tuning data for Gemini models
- JSON Lines format
- OpenAI API pricing (fine-tuning prices per model)
- RFC 4180: Common Format for CSV files
Limits
- Token counts are an estimate (characters divided by 4), not a real tokenizer, so treat them as approximate. The 16,385 token warning comes from OpenAI's 2023 cookbook for gpt-3.5-turbo; newer models and other trainers allow longer examples.
- Each format gets structural checks (keys, roles, empty turns). Reinforcement fine-tuning files and image parts are not checked in depth, and conversion skips lines with tool calls or images.
- It does not judge the quality of the examples or check the content against OpenAI's usage policies.
- The cost estimate uses the rough token count and the price you type in; the real bill depends on the model's tokenizer, the epochs the job actually runs and current prices.
- Duplicate checks compare whole examples and the text before the last assistant reply, ignoring case and spacing; paraphrased prompts are not detected.
- The CSV converter makes single-turn examples (one optional system, one user, one assistant message per row).
Questions
- Can I still fine-tune on OpenAI?
- Only as an existing eligible customer. OpenAI's fine-tuning guide says the platform is no longer accessible to new users and that eligible customers can create training jobs until January 6, 2027, unless the base model shuts down earlier.
- What is the ShareGPT format?
- One JSON object per line with a conversations list; each turn has from (human, gpt or system) and value. Axolotl, LLaMA-Factory and many open datasets use it. The converter turns it into chat messages and back.
- What is the Alpaca format?
- One object per line with instruction, an optional input and output. It holds a single turn, so a multi-turn conversation cannot be converted to it; those lines are skipped and listed.
- What format does OpenAI fine-tuning data need?
- A JSONL file where each line is one JSON object with a messages array. Each message has a role (system, user or assistant, plus tool for tool results) and content, and each example needs at least one assistant reply. Preference (DPO) files instead hold input.messages, preferred_output and non_preferred_output.
- How many examples do I need to fine-tune?
- OpenAI's minimum is 10. Its guide suggests starting with about 50 well-made examples and adding more if the results improve.
- Why does my JSONL file fail validation?
- The usual causes are an object spread across several lines, a missing comma or bracket, a role name the API does not know, or an example with no assistant message. The table above shows which line has which problem.
- What does weight do in fine-tuning data?
- It goes on an assistant message and is 0 or 1. With 0 the model does not learn from that reply, which is handy for multi-turn examples where only the last answer is good.
- Is my training data uploaded?
- No. The file is read and checked in your browser. Files never leave your device.
- How much does fine-tuning cost?
- Roughly the training tokens times the epochs times your model's price per 1M training tokens. Enter the price from OpenAI's pricing page and the tool multiplies it out; it does not store prices because they change.
- How do I convert a CSV to fine-tuning JSONL?
- Paste or open the CSV in the converter, pick which columns hold the user prompt and the answer (and optionally a system prompt), then download the .jsonl or send it straight to the validator.