Convert CSV to Fine-Tuning JSONL
OpenAI / AlpacaConvert CSV training spreadsheets into validated newline-delimited JSONL for OpenAI, Claude, and Alpaca fine-tuning—locally.
or drop a text or data file here · Ctrl V to paste · or drop a .csv file · Ctrl V to paste CSV
- 0 bytes uploaded
- OpenAI Chat & Alpaca presets
- Validates every JSONL line
Instant Before & After Preview
OpenAI & Alpaca presetsprompt,completion
"What is UTF-8 BOM?","A 3-byte EF BB BF signature telling Excel to decode UTF-8."
"Why use JSONL?","Each line is an independent JSON record for streaming fine-tuning."{"prompt":"What is UTF-8 BOM?","completion":"A 3-byte EF BB BF signature telling Excel to decode UTF-8."}
{"prompt":"Why use JSONL?","completion":"Each line is an independent JSON record for streaming fine-tuning."}Source vs. target format specification comparison: CSV → JSONL / NDJSON
| Property | Source: CSV | Target: JSONL / NDJSON |
|---|---|---|
| Structure type | Tabular | Hierarchical |
| Human readability | High | Medium |
| Nesting support | No | Yes |
| LLM token efficiency | High | Medium |
| File extension | .csv | .jsonl |
| MIME type | text/csv | application/x-ndjson |
| Best for | Spreadsheet imports, analytics exports, SQL table loads, and uniform flat datasets. | OpenAI/Anthropic/Gemini fine-tuning datasets, batch inference jobs, log ingestion, and streaming ETL. |
How it works
How to build JSONL training datasets from CSV
Map CSV columns into clean single-line JSON records without leaking proprietary training examples.
- Load training CSVDrop a CSV with columns like prompt/completion, system/user/assistant, or instruction/input/output.
- Pick JSONL templateChoose Raw JSON objects, OpenAI Chat ({ messages: [...] }), or Alpaca format.
- Count tokens & export .jsonlDownload validated .jsonl or pass straight into LLM Token Counter.
FAQ
Frequently asked questions
How does the OpenAI Chat template map CSV columns?
It looks for system, user/prompt/question, and assistant/completion/answer columns and builds { "messages": [ ... ] } objects automatically.
What if my CSV contains extra whitespace around cells?
Leave Trim Field Whitespace and Skip Empty Rows enabled so blank lines never emit broken JSONL rows.
Can I estimate fine-tuning token counts right after converting?
Yes. Click Continue with LLM Token Counter on the result screen to estimate token budgets offline.