Free CSV to JSONL — BigQuery · OpenAI · Elasticsearch — no upload
Convert CSV to JSONL
One JSON object
per line.
Free CSV to JSON Lines (JSONL / NDJSON) converter. One JSON object per line — the standard format for BigQuery streaming inserts, MongoDB mongoimport, Elasticsearch bulk API, OpenAI fine-tuning and Hugging Face datasets. Upload or paste. No server.
Your data never leaves your browser
BigQuery ready
OpenAI fine-tuning
Copy to clipboard
Always free
CSV to JSONL Converter
100% client-side
Drop your CSV file here
.csv, .txt or .tsv — or paste below
or paste CSV directly
JSONL ready
Where JSONL is the required format
Six major platforms that use JSON Lines as their standard import format.
BigQuery
bq load --source_format=NEWLINE_DELIMITED_JSON — streaming inserts and batch loads both use JSONL.
OpenAI fine-tuning
Training data for GPT fine-tuning must be in JSONL format: one {"messages": [...]} object per line.
Elasticsearch
Bulk API requires alternating action/source JSONL pairs: {"index":{}} then {"field":"value"}.
MongoDB mongoimport
mongoimport --type json reads NDJSON by default — one document per line, no --jsonArray flag needed.
Hugging Face Datasets
load_dataset("json", data_files="data.jsonl") — JSONL is the standard format for HF dataset uploads.
DuckDB
SELECT * FROM read_ndjson_auto('data.jsonl') — DuckDB reads JSONL natively with schema inference.
CSV to JSONL code examples
Python — simplest
import csv, json
with open('data.csv') as f_in, open('output.jsonl', 'w') as f_out:
for row in csv.DictReader(f_in):
f_out.write(json.dumps(row) + '\n')
All values are strings — add type coercion before json.dumps() for numeric fields.
BigQuery import
bq load \
--source_format=NEWLINE_DELIMITED_JSON \
--autodetect \
myproject:mydataset.mytable \
gs://bucket/data.jsonl
--autodetect infers the BigQuery schema from the first 100 lines of JSONL. Upload the .jsonl from CSVShift to GCS first.
Related CSV tools
Popular searches
csv to jsonlcsv to json linescsv to ndjsonconvert csv to jsonlcsv to jsonl onlinecsv to jsonl pythoncsv to jsonl bigquerycsv to jsonl openaicsv to ndjson convertercsv to jsonl freecsv to jsonl huggingfacecsv to jsonl elasticsearch
Frequently asked questions
What is JSONL / NDJSON?
JSONL (JSON Lines) and NDJSON (Newline Delimited JSON) are the same format — one JSON object per line, separated by newlines. Unlike a JSON array, JSONL can be streamed and processed line-by-line without loading the entire file into memory. It is the standard format for BigQuery, MongoDB, Elasticsearch and OpenAI fine-tuning datasets.
How do I convert CSV to JSONL in Python?
import csv, json; [open('out.jsonl','w').write(json.dumps(r)+'\n') for r in csv.DictReader(open('f.csv'))]. For type coercion, convert string values to int/float/bool before json.dumps().Is my data safe when converting CSV to JSONL online?
Yes. CSVShift converts your CSV entirely in your browser. No data is uploaded to any server.
