Converter Tools
CSV to NDJSON Converter
Convert CSV to NDJSON (JSON Lines) in your browser. RFC 4180 parsing, dotted header rebuild, type inference, custom delimiters, and a downloadable .ndjson file.
Delimiter
Comma is the default. Tab parses a TSV. Semicolon is common in European Excel locales. Pipe is common in legacy ETL exports.
Header
Output shape
Row width
Conversion runs entirely in your browser. Your CSV is never sent to a server.
About NDJSON (JSON Lines / JSONL)
NDJSON is one complete JSON value per line, separated by a single line feed. It is the format that BigQuery, Athena, and Snowflake ingest natively, and the format that OpenAI fine-tuning, Anthropic batch jobs, and Hugging Face datasets read with one record per example. Pretty-printed JSON or a single top-level JSON array is not NDJSON. The Copy and Download buttons emit canonical one-record-per-line text.
NDJSON example
{"id":1,"name":"Ada"} {"id":2,"name":"Grace"} {"id":3,"name":"Alan"}Nested rebuild example
Header: id,addr.city,tags.0 Row: 1,London,founder NDJSON: {"id":1,"addr":{"city":"London"},"tags":["founder"]}How to use
- Paste your CSV into the input box, or click Load sample for a realistic example that exercises quoted fields, embedded commas, and dotted headers.
- Pick the delimiter (comma, semicolon, tab, or pipe) and the header mode. Use First row is the header for normal CSVs; use No header row to auto-name columns col_1, col_2 when your file starts with data.
- Choose the output shape. Keep flat keys when downstream consumers expect address.city verbatim. Switch to Rebuild nested objects to turn dotted headers and indexed columns back into nested objects and arrays.
- Adjust the row width policy and the cleanup toggles: pad short rows with null or fail strict, infer types, treat empty cells as null, trim whitespace from cells, and skip blank rows.
- Use the Pretty preview tab to verify the first few records look right, then click Copy NDJSON to copy the canonical text or Download .ndjson to save it as a file. The download streams one record per line, ready for BigQuery, Athena, Snowflake, OpenAI fine-tune jobs, or any tool that expects NDJSON.
About this tool
CSV to NDJSON Converter turns a CSV (or TSV, semicolon, or pipe-separated file) into newline-delimited JSON, the streaming format that BigQuery, Athena, and Snowflake ingest natively and that OpenAI fine-tuning, Anthropic batch jobs, Hugging Face Datasets, and log pipelines like Fluentd, Vector, and Loki read with one record per line. The parser implements the same RFC 4180 subset the rest of the catalog uses: quoted fields with doubled-quote escapes, multi-line cells inside quotes, mixed LF and CRLF row separators, a leading UTF-8 BOM stripped automatically, and clear error messages with line and column numbers for unclosed quotes or stray quote characters. Headers can come from the first row or be auto-numbered as col_1, col_2; empty and duplicate header cells are sanitized (an empty cell becomes col_N, a duplicate gets a numeric suffix) so the JSON is always valid. Smart type inference is conservative: only the exact tokens true, false, and null become their JSON-native types, only purely-digit strings that fit a safe JavaScript integer become numbers, only fixed-point decimals become floats, and everything else (including 19-digit Snowflake IDs and zip codes with leading zeros) stays as a string. Nested rebuild reads dotted headers and rebuilds nested objects and arrays in the output, the inverse of the flatten convention used by pandas.json_normalize and the existing NDJSON-to-CSV tool: address.city becomes a nested object, tags.0 and tags.1 become an array, items.0.name becomes an array of objects, and a backslash escapes a literal dot in a header. A row-width policy decides what to do with ragged rows: pad with null and keep going, or stop on the first mismatch and surface the row number. Empty cells can become an empty string or JSON null. The output panel offers two views (raw NDJSON for export and a pretty-printed preview of the first records for human reading), a header bar with row, column, and byte counts, a Copy button that always copies canonical one-record-per-line text, and a Download .ndjson button that streams the same text as a file with the application/x-ndjson MIME type. Everything happens locally in your browser. Your CSV never leaves your device, which matters because production data often includes personally identifiable values that you do not want to upload to a third-party tool.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
NDJSON to CSV Converter
Line-by-line NDJSON to CSV converter with nested key flattening, error skipping, and configurable delimiters.
Open tool
ConverterCSV to JSON Converter
Two-way CSV and JSON converter with delimiter and header controls.
Open tool
ConverterJSON to CSV Converter
Convert JSON arrays to CSV with nested flattening and Excel-friendly options.
Open tool
DeveloperJSON Lines Formatter
Validate JSONL line by line, convert to and from a JSON array, and inspect record stats.
Open tool
ConverterCSV Validator
Parse errors, row width checks, delimiter detection, and dialect diagnostics for any CSV.
Open tool
DeveloperJSON Formatter
Format, minify, and validate JSON in your browser.
Open tool