---
title: "CSV to NDJSON"
description: "Convert a spreadsheet CSV into newline-delimited JSON (.ndjson, .jsonl) in your browser: one JSON object per line, keyed by the header row, with optional type coercion. Nothing is uploaded."
url: https://findutils.com/convert/csv-to-ndjson/
category: convert
---

# CSV to NDJSON

Convert a spreadsheet CSV into newline-delimited JSON (.ndjson, .jsonl) in your browser: one JSON object per line, keyed by the header row, with optional type coercion. Nothing is uploaded.

**Use this tool:** [CSV to NDJSON](https://findutils.com/convert/csv-to-ndjson/)

## Programmatic access

- REST id `csv-to-ndjson`: POST https://api.findutils.com/api/tools/csv-to-ndjson/execute (reference: https://findutils.com/api/csv-to-ndjson/)
- MCP tool `csv_to_ndjson` on https://mcp.findutils.com (reference: https://findutils.com/mcp/csv-to-ndjson/)

## Why Use Our CSV to NDJSON Converter?

A log shipper, a bulk loader and a fine-tune job read one JSON object per line, a format called JSON Lines, NDJSON or JSONL. A spreadsheet exports CSV. The usual bridge is a short Python script or a JSON array split with jq, and both take longer than the export itself. This page reads the CSV per RFC 4180, so a quoted comma or a line break inside a cell stays inside the value, and writes one JSON object per line with the header as keys. Every value stays a string unless you turn on Coerce types, which is the safe default for zip codes and ids. The conversion runs in your browser; the file never leaves the tab.

## Frequently Asked Questions

### What is the difference between .ndjson and .jsonl?

None in the content. Both hold one JSON object per line with line-feed separators. .ndjson stands for newline-delimited JSON and .jsonl for JSON Lines. The download is named .ndjson; rename it to .jsonl if a loader checks the extension.

### Why is every value a string?

A CSV carries no types, so 007, 1e5 and a phone number are all just text. Turning text into numbers by guessing is how a zip code loses its leading zero. Values stay strings unless you turn on Coerce types, and then only true, false, null, an empty cell and a plain number change.

### What exactly does Coerce types change?

true and false become booleans. null and an empty cell become JSON null. A plain number such as 42, -3.5 or 1e3 becomes a JSON number. A number with leading zeros stays a string. An integer of 2^53 or more, for example a 64-bit id, stays a string so no digit is lost. 1.0 becomes the number 1.

### Can I get nested objects from dotted column names?

No. A header user.name produces the flat key user.name. Rebuilding nested objects would need a rule for arrays and for keys that contain a dot, and a wrong rule changes data silently. If you need nested JSON, convert the flat JSON in a script that knows your schema.

### How is the separator detected?

The header line is split with a comma, a semicolon, a tab and a pipe, and the one that gives the most fields wins. A file that uses semicolons is read correctly without a setting. Pick the separator by hand when the header contains the other character inside a quoted name.

### What happens to a row with the wrong number of values?

A row with more values than the header keeps the first values and is named in the notes with its row number; the header counts as row 1. A row with fewer values fills the missing keys with an empty string, or null when Coerce types is on. Blank lines are skipped and counted in the status line.

### What if two header cells have the same name?

The second one gets a suffix: a and a_2, then a_3. An empty header cell becomes column_N with its position. The notes list every renamed key so you can fix the header in the sheet if you prefer.

### Is my file uploaded anywhere?

No. The CSV is parsed and the JSON Lines are written in your browser, and no request carries the file. You can confirm that in the browser's network panel while converting.

### How large a file can I convert?

The input cap is 10 MB of text. The conversion runs in the tab, so a file near the cap can keep the browser busy for a moment. Use Download rather than Copy for a large output. For a batch or a script, the same converter is on the FindUtils API as csv_to_ndjson.

### How do I convert NDJSON back to CSV?

Use the NDJSON to CSV tool, or flip the direction toggle on this page. It builds the header from every key across every line, flattens nested objects to dot paths, and skips a bad line with a note.

## Related Tools

- [NDJSON to CSV](https://findutils.com/convert/ndjson-to-csv/)
- [JSON to CSV](https://findutils.com/convert/json-to-csv/)
- [JSON to SQL](https://findutils.com/convert/json-to-sql/)
- [CSV to SQL](https://findutils.com/convert/csv-to-sql/)
- [CSV Viewer](https://findutils.com/convert/csv-viewer/)
- [CSV to Excel](https://findutils.com/convert/csv-to-excel/)
- [TSV to CSV](https://findutils.com/convert/tsv-to-csv/)
