Convert CSV to Fine-Tuning JSONL

OpenAI / Alpaca

Convert CSV training spreadsheets into validated newline-delimited JSONL for OpenAI, Claude, and Alpaca fine-tuning—locally.

100% Client-Side — Verify 0 bytes uploaded in Network tabVerify 0 bytes sent in Network tab

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 presets
Before (Input)qa-pairs.csv
prompt,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."
After (Output).jsonl
{"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

PropertySource: CSVTarget: JSONL / NDJSON
Structure typeTabularHierarchical
Human readabilityHighMedium
Nesting supportNoYes
LLM token efficiencyHighMedium
File extension.csv.jsonl
MIME typetext/csvapplication/x-ndjson
Best forSpreadsheet 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.

  1. Load training CSVDrop a CSV with columns like prompt/completion, system/user/assistant, or instruction/input/output.
  2. Pick JSONL templateChoose Raw JSON objects, OpenAI Chat ({ messages: [...] }), or Alpaca format.
  3. 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.