jsonlkit.com
JSONL (JSON Lines) utilities, in the browser
Say hi →

Chat Format Converter

updated 28 July 2026

Convert a fine-tuning dataset between chat formats. OpenAI chat, Anthropic messages, ShareGPT, Alpaca, Gemini and legacy prompt/completion — pick a target and the source format is detected per line. Up to 1 GB, in your browser.

Convert

Drop a .jsonl file here, or Up to 1 GB · in your browser

How each format maps

Every record is normalised into a neutral shape — an optional system prompt plus an ordered list of user / assistant turns — and then re-emitted in the target format. That is why any source converts to any target without n×n special cases.

Where multi-turn data gets lost

Only two of these formats are single-turn. Converting a three-exchange conversation into Alpaca or prompt / completion cannot preserve it — the tool keeps the first user turn and the first assistant turn, and the status bar turns amber telling you how many records were affected.

If your data is multi-turn, target one of the chat formats. If you must produce Alpaca, consider splitting conversations into one record per exchange first rather than silently dropping context.

Validate after converting

Conversion gets the shape right; it does not guarantee the provider will accept the file. Run the result through the matching validator — OpenAI, Anthropic, Gemini, Llama or Mistral — which check role alternation, empty content, token limits and the provider-specific rules this converter deliberately stays out of.

Privacy

Nothing is uploaded. The whole thing runs in this tab, in your own browser. That matters here more than on most tool sites — training data is usually the most sensitive file a team owns.

Frequently asked questions

Why did some lines get skipped?

Their shape did not match any known format — often because they are already flat records rather than conversations, or a key is spelled differently. Set From explicitly instead of Auto-detect, and check the skipped count in the status bar.

Does it preserve tool calls and function definitions?

No. The neutral shape carries text turns only, so tool_calls, function_call and typed content blocks are flattened to their text or dropped. If your dataset uses tool calling, convert by hand or keep the original format.

What happens to multiple system messages?

They are concatenated with newlines into a single system prompt, since every target format allows at most one.

Can I convert several formats in one file?

Yes — with Auto-detect, each line is examined on its own, so a mixed file converts cleanly and the status bar lists the counts per detected format.

Related tools