Fine-tuning dataset converter
Convert training data between Alpaca, ShareGPT and OpenAI messages JSONL, with every record detected on its own.
Input
Result
The result will appear here.Fine-tuning datasets come in three shapes that mean the same thing: Alpaca's instruction / input / output, ShareGPT's conversations with from and value, and the OpenAI chat format with role and content. LlamaFactory, Axolotl, Unsloth and the OpenAI fine-tuning API each prefer a different one, and a dataset scraped from the Hub usually arrives in the wrong one — sometimes in two of them in the same file. This converter reads JSONL or a JSON array, works out the shape of each record individually, and writes the target format, so a mixed or half-converted file still comes out clean.
How it works
- Each record is detected by its keys — messages, conversations, or instruction/output — so a file that mixes formats converts in one pass.
- A system prompt typed in the options is added to records that have none, which is how you give an Alpaca set the system message your trainer expects.
- Alpaca holds exactly one exchange, so a multi-turn conversation keeps its first question and answer; the number of dropped turns is reported, never hidden.
Where your data goes
Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.
This tool is free and needs no account. Its results exist only in your open page and are not saved anywhere.
What it costs
This tool is free, with no sign-in and no points.
Common questions
- What happens to examples with an empty answer?
- They are skipped and counted under Skipped. An example without an assistant turn teaches the model nothing and makes some trainers abort, so leaving it out is the safer default. The same goes for records whose shape could not be recognised.
- Are tool calls and images preserved?
- No. Only text turns with the roles system, user and assistant survive the conversion, because Alpaca and ShareGPT have no way to express a tool call or an image part. Multimodal and function-calling datasets need the OpenAI format on both sides and should not be converted.
- Does the output match what LlamaFactory calls sharegpt?
- Yes: a conversations array of {from: human|gpt, value} objects, with an optional top-level system field, which is the layout LlamaFactory's dataset_info.json describes for the sharegpt format. Alpaca output uses instruction, input (left empty) and output, plus system when the source had one.
The open-source behind it
This tool is a self-contained implementation. hiyouga/LlamaFactory (Apache-2.0) does the same job as a library — if you need this behaviour inside your own program, start there rather than calling a web page.
hiyouga/LlamaFactoryAlso known as
- alpaca to sharegpt converter
- sharegpt to openai jsonl
- fine-tuning dataset format
- llama factory dataset format
- convert alpaca json
- chat dataset converter