CSV to NDJSON Converter
Turn CSV into NDJSON — one JSON object per line, no enclosing array — ready for jq, BigQuery, Elasticsearch bulk, and log pipelines. Optional number/boolean inference and custom delimiters. Runs entirely in your browser, no upload, no sign-up.
About this tool
NDJSON (newline-delimited JSON, also written .ndjson or .jsonl) puts one complete JSON
value on each line, with no enclosing array. That's the format streaming tools want: you can
process a huge file line-by-line without loading it all into memory, cat two files together,
tail -f a stream, or feed it straight into jq -c, a BigQuery load job, an Elasticsearch bulk
request, or a log shipper.
This converter parses your CSV — including quoted fields with embedded commas, newlines, and
"" escapes (RFC 4180) — and emits one JSON object per data row. Everything runs locally in
your browser: your data never leaves the page.
Worked example
Input CSV:
name,age,active
Ada,36,true
Grace,,false
Output NDJSON (defaults — every value stays a string, so nothing is lost):
{"name":"Ada","age":"36","active":"true"}
{"name":"Grace","age":"","active":"false"}
Turn on Parse numbers and Parse true/false/null and the same input becomes typed:
{"name":"Ada","age":36,"active":true}
{"name":"Grace","age":null,"active":false}
Untick First row is headers and each row is emitted as a JSON array instead of an object:
["Ada","36","true"].
Options
- Delimiter —
,by default; also accepts;,|, the wordtab, or any single character (great for TSV exports). - First row is headers — on: keys come from the header row (objects). Off: rows become arrays.
- Parse numbers — numeric cells become JSON numbers. Values with leading zeros or a leading
+(007,+1) stay strings, so zip codes and ids survive. - Parse true/false/null — the literals
true,false, andnull(and empty cells) become JSON booleans /null. - Trim whitespace — strips spaces around each cell before conversion.
FAQ
What's the difference between NDJSON, JSONL, and a normal JSON array?
They describe the same idea: NDJSON and JSONL both mean "one JSON value per line, no
wrapping array." A normal JSON array ([ {...}, {...} ]) must be parsed as a whole; NDJSON can
be read one line at a time, which is why streaming and big-data ingest tools prefer it. This
tool outputs the line-delimited form; use the CSV to JSON tool if you want a single array.
Why are my numbers and booleans coming out as strings?
By default every cell is emitted as a JSON string, so nothing is silently reinterpreted. Tick Parse numbers to turn numeric cells into JSON numbers and Parse true/false/null to turn those literals into real booleans/null. Leaving them off is the safe, lossless choice for pipelines that do their own typing.
Will it handle commas and newlines inside a quoted field?
Yes. Fields wrapped in double quotes may contain the delimiter, line breaks, and escaped quotes
("" → "), following RFC 4180. So "Ada, L" stays a single value and an embedded newline is
encoded as \n in the JSON output.
How do I convert a tab-separated (TSV) file?
Set the delimiter to the word tab (or paste an actual tab character). Any single character
works as a delimiter, so ; and | exports convert the same way.
Is there a size limit and does my data get uploaded?
Nothing is uploaded — the conversion happens entirely in your browser via WebAssembly, so your data stays on your machine. Because it all runs in memory, extremely large files (hundreds of MB) may be slow or hit the browser tab's memory limit; for those, a command-line NDJSON converter is a better fit.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool csv-to-ndjson "name,age,active
Ada,36,true
Grace,,false"New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/csv-to-ndjson/?data=name%2Cage%2Cactive%0AAda%2C36%2Ctrue%0AGrace%2C%2Cfalse&delimiter=%2C&headers=true&parse_numbers=true&parse_bools=true&trim=trueMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
