CSV to NDJSON
BetaConvert 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.
- Free, no sign-up
- REST + MCP
- Updated
- Reviewed by Olgun Ozoktas
Converted in your browser. We do not upload the file. The header row becomes the keys. Nested JSON is not rebuilt from dotted column names. A huge file is limited by tab memory, so use Download, not Copy, for a big output.
One JSON object per line will appear here..
Why Use Our CSV to NDJSON Converter?
JSON Lines, also called NDJSON or JSONL, holds one JSON value per line. A loader reads it a line at a time, which is why bulk import tools, log shippers and fine-tune jobs prefer it to a JSON array. A spreadsheet knows nothing about it and exports CSV. This page is the bridge: it reads the CSV per RFC 4180 and writes one JSON object per line, in header order, with LF line ends.
The header row becomes the keys. Names are trimmed, an empty name becomes column_N, and a duplicate name gets a numeric suffix so no value is lost. The separator is detected from the header among comma, semicolon, tab and pipe, or set by hand. A quoted field may hold the separator, a doubled quote or a line break and stays one value. A row wider than the header keeps the first values and is named in the notes; a narrower row fills the missing keys with an empty string, or null under Coerce types. Blank lines are skipped and counted.
Every value is a string by default, because a CSV has no types and a wrong guess corrupts data silently. With Coerce types on, true and false become booleans, null and an empty cell become null, and a plain number becomes a JSON number. A number with leading zeros stays text, and an integer of 2^53 or more stays text so a 64-bit id keeps every digit. Dotted header names are not rebuilt into nested objects. The input cap is 10 MB. Nothing is uploaded; the file is converted in your browser.
How it compares
A pandas script or a jq pipeline does the same job when the tools are installed and someone writes the type rules. Online converters that upload the CSV send a customer list or a dataset to a server for a format change. This page reads the CSV properly, makes the type decision explicit with one switch, names the rows it changed, and keeps the file in the tab.
CSV to NDJSON Tips
- Coerce types turns true and false into booleans, null and an empty cell into JSON null, and a plain number into a JSON number. 007 stays the string 007, and an integer of 2^53 or more stays a string so no digit is lost.
- Dotted header names such as user.name stay flat keys. The tool does not rebuild nested objects, so the key in the JSON is the text user.name.
- An empty header cell becomes column_N. A duplicate header gets a suffix: the second a is a_2. The notes say which names changed.
- A row with more values than the header keeps the first values and is named in the notes with its row number. The header is row 1.
- The output has LF line ends and one trailing newline. .ndjson and .jsonl are the same format under two names.