# Convert Fine-Tuning Datasets — ShareGPT, Alpaca, OpenAI, Anthropic

> Convert training data between the six common chat formats, and validate the result against the rules the upload endpoints enforce.

This converter moves fine-tuning data between the OpenAI chat, Anthropic messages, ShareGPT, Alpaca, Gemini and ChatML formats. Everything passes through one canonical representation, so system prompts, role names and multi-turn structure survive the conversion, and the result is checked against the structural rules the training endpoints enforce — first turn must be user, roles must alternate, and there must be something for the model to learn from.

**URL:** https://convertto.tech/t/fine-tuning-dataset-converter
**Category:** AI & LLM Tools (https://convertto.tech/c/ai-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Formats:** OpenAI, Anthropic, ShareGPT, Alpaca, Gemini, ChatML and plain text
- **Validates:** Role alternation, first and last turn, empty content, format-specific limits
- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Enter or paste your dataset.
2. Choose the from.
3. Choose the to.
4. Turn "Validate structure" on or off as needed.
5. Turn "Drop rows with errors" on or off as needed.
6. Press Run, then download the result when it is ready.

## FAQ

### Why does my dataset fail to upload even though the JSON is valid?

Almost always one of four structural rules: the first turn is not `user`, two turns share a role consecutively, there is no assistant turn at all, or a turn has empty content. The validator here checks exactly those, with line numbers.

### What happens to multi-turn conversations converted to Alpaca?

Only the first exchange survives — Alpaca has one instruction and one output field and no way to represent a third turn. The tool counts how many rows this affects and says so rather than losing the data quietly.

### Where does the system prompt go?

It depends on the target. OpenAI and ShareGPT carry it as the first message; Anthropic and Gemini put it in a sibling field; Alpaca has no slot for it, so it is folded into the `input` field. The converter handles each case and none of them lose it.

## Sources

- [OpenAI — fine-tuning data format](https://platform.openai.com/docs/guides/fine-tuning) — OpenAI

## Related tools

- [JSONL Validator](https://convertto.tech/t/jsonl-validator): Validate JSON Lines line by line, check chat-format structure, and estimate what training on the file would cost.
- [Prompt Template Generator](https://convertto.tech/t/prompt-template-generator): Write a prompt once with placeholders, paste rows of data, and get every filled prompt back with its token count and cost.
- [Sample Dataset Generator](https://convertto.tech/t/sample-dataset-generator): Download ready-made sample datasets — users, orders, products, transactions — as CSV, JSON, SQL or Excel-ready TSV.
- [AI API Cost Calculator](https://convertto.tech/t/ai-api-cost-calculator): Work out what a prompt costs per call, per day and per month, and compare the same workload across every major model.
- [AI Writing Pattern Checker](https://convertto.tech/t/ai-writing-pattern-checker): Measure sentence-length variance, vocabulary richness, marker phrases and typographic tells, with per-sentence scoring.
- [Chat Export Formatter](https://convertto.tech/t/chat-export-formatter): Drop in an exported conversations file and get clean Markdown, HTML or plain text — one document per conversation.
- [Context Window Calculator](https://convertto.tech/t/context-window-calculator): Paste a document and see which models it fits inside, how much of each window it fills, and what is left for the reply.
- [Embedding Similarity Calculator](https://convertto.tech/t/embedding-similarity-calculator): Paste embedding vectors and get every pairwise cosine, dot product, Euclidean and Manhattan distance, ranked.
