CSV to JSONL Converter
Convert CSV to JSONL (one JSON object per row) or JSON Lines / NDJSON back to CSV, with header, delimiter and type-inference options. Runs 100% in your browser — your data never leaves the page.
CSV input
Detected delimiter: Comma (,)
JSONL output
4 records
How CSV ⇄ JSONL conversion works
- CSV → JSONL: each CSV row becomes one JSON object on its own line, keyed by the header row (or
col1,col2… without a header). Duplicate or empty header names are made unique. - Type inference turns
42,3.14,true/falseandnullinto JSON types. Values like007or IDs longer than 253 stay strings so nothing is silently changed; empty cells stay empty strings. - JSONL → CSV: the header is the union of top-level keys across all lines in first-seen order. Nested objects and arrays are written as compact JSON strings;
nulland missing keys become empty cells. - Quoted fields, embedded delimiters, quotes and newlines are handled per RFC 4180. Use the CSV to JSON converter when you need a single JSON array instead, or JSON ⇄ JSONL to switch between array and lines.
What is JSONL (JSON Lines / NDJSON)?
JSON Lines — also called NDJSON (newline-delimited JSON) — is a text format where every line is one complete, self-contained JSON value, usually an object. There are no commas between records and no surrounding [ ]. Files typically use the .jsonl or .ndjson extension.
{"id": 1, "event": "signup", "plan": "free"}
{"id": 2, "event": "upgrade", "plan": "pro"}JSONL vs a JSON array
A JSON array must be parsed as a whole, so a single missing bracket breaks the entire file. JSONL can be streamed, appended to, split and processed line by line (head, grep, wc -l), and a corrupt line only affects that one record. Use a JSON array for small API payloads and config; use JSONL for large datasets, logs and anything written incrementally.
Where JSONL is used
- OpenAI fine-tuning datasets and Batch API input/output files (one request or example per line).
- BigQuery, Snowflake, Redshift and Athena bulk loads (
NEWLINE_DELIMITED_JSON). - Structured logs from Docker, Kubernetes, Bunyan, Pino and most log shippers.
- Elasticsearch / OpenSearch bulk API, MongoDB
mongoexport, Hugging Face datasets. - Data pipelines with
jq -c, Spark, pandasread_json(lines=True)and DuckDB.
All JSONL tools on DevToolsDaily run 100% in your browser — your data is never uploaded. See also the JSONL formatter, JSON ⇄ JSONL converter and CSV ⇄ JSONL converter.