Skip to content
migration.tools
CSV to NDJSON

CSV to NDJSON converter

Convert CSV rows to newline-delimited JSON, one object per line, ready for BigQuery or an Elasticsearch bulk import.

Going the other way? NDJSON to CSV

Options

CSV

NDJSON

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your CSV or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the NDJSON or download it. Drop several files to convert a batch into one ZIP.

How CSV becomes NDJSON

Every row in the CSV input becomes one record in the NDJSON output, and the header row supplies the field names. Column order is preserved.

Cells are typed where the meaning is unambiguous: 42 and 3.14 become numbers, true and false become booleans, and an empty cell becomes null. Anything that only looks numeric — 00501, +44 20 7946 0958, a 19-digit order ID — stays a string, because turning it into a number would corrupt it.

CSV and NDJSON, briefly

CSV is the lowest common denominator for tabular data: every spreadsheet, database and import wizard reads it. It has no types and no nesting, and details such as the delimiter, quoting and encoding vary between programs.

NDJSON (also called JSON Lines) puts one JSON object on each line. It is what BigQuery, Elasticsearch bulk imports, OpenAI fine-tuning files and most log pipelines expect, because it can be streamed and appended to.

Questions

Which CSV dialects are supported?

Comma, semicolon, tab and pipe delimiters are detected automatically. Quoted fields, escaped quotes (""), line breaks inside quotes and a UTF-8 byte-order mark are all handled. If your file has no header row, switch that option off and columns are named column_1, column_2, and so on.