CSV to NDJSON Converter

Convert CSV to Newline-Delimited JSON for log pipelines and BigQuery

Ad placeholder (leaderboard)

Convert CSV into newline-delimited JSON

The CSV to NDJSON Converter turns each CSV row into a single JSON object on its own line. This newline-delimited format — also called JSON Lines or JSONL — is what BigQuery loads, the Elasticsearch bulk API, and most log shippers expect, because it can be read and written one record at a time without holding the whole file in memory.

How it works

The tool parses your CSV with a quote-aware parser, so commas, newlines, and escaped quotes ("") inside quoted fields are handled correctly. The first row is treated as the header and supplies the JSON keys. Each subsequent row becomes an object whose keys are the headers and whose values come from the cells.

When type inference is enabled, each cell is checked against strict rules: a value matching a JSON number pattern becomes a number, true and false become booleans, and null becomes JSON null. Leading-zero strings like 007 and grouped numbers like 1,000 deliberately stay strings so IDs and codes are not mangled. The output is then joined with \n so every object sits on its own line.

Example and notes

Given this CSV:

id,name,active
1,Ada Lovelace,true
2,"Hopper, Grace",false

the converter produces:

{"id":1,"name":"Ada Lovelace","active":true}
{"id":2,"name":"Hopper, Grace","active":false}

Notice the quoted comma inside "Hopper, Grace" is preserved as part of one field. For BigQuery loads, set the source format to NEWLINE_DELIMITED_JSON; for Elasticsearch, remember the bulk API needs an action line between documents, which this tool does not add — it emits the raw document stream.

Ad placeholder (rectangle)