Convert CSV to JSON lines (JSONL / NDJSON / LDJSON)

Want to convert CSV to JSON lines (JSONL / NDJSON / LDJSON)?

Try Withdata Data File Converter, a desktop CSV to JSON converter for Windows, MacOS, and Linux, Convert CSV to JSON lines, Easy and Fast.

  • Can run in GUI mode, Step by Step, just a few mouse clicks.
  • Can run in Command line, for Scheduled Tasks and Streams.
  • Convert files locally and privately, avoid uploading large CSV file(s) to online services.

Download DataFileConverter Download DataFileConverter

JSON Lines text format (JSONL), also called Newline-delimited JSON (NDJSON), or Line-delimited JSON (LDJSON). JSON Lines files may be saved with the file extension .jsonl, *.ndjson, *.ldjson.

Convert CSV to JSON lines (JSONL / NDJSON / LDJSON)

Choose CSV file -> Set target JSON Lines (JSONL / NDJSON / LDJSON) file -> Convert CSV to JSON lines (JSONL / NDJSON / LDJSON)

Click “Start a New Convert” at task dialog.

Convert CSV to JSONL - task window

then show the wizard.

Select source/target file type.

Convert CSV to JSONL - select type

1. Open a CSV file.

Convert CSV to NDCSV - open JSON lines file

The CSV content:

Convert CSV to NDCSV - JSON lines content

2. Config target JSON Lines (JSONL / NDJSON / LDJSON) file.

Convert CSV to LDCSV - config CSV file

3. Set rows options.

Convert CSV to JSONL - summary

4. Convert CSV to JSON lines (JSONL / NDJSON / LDJSON).

Convert CSV to NDJSON - convert

See JSON lines file

Convert CSV to LDJSON - view JSON lines file

Convert CSV to JSON lines (JSONL / NDJSON / LDJSON) in command line

Save “CSV to JSON Lines” session, then you can:

Set scheduled tasks for converting CSV to JSON lines (JSONL / NDJSON / LDJSON)

You can schedule and automate this converting task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “CSV to JSON lines” conversion.
  2. Set scheduled task for “CSV to JSON lines” conversion.

FAQ

What is Withdata DataFileConverter?
How long does it take to convert CSV to JSON lines?
Is it safe to convert CSV to JSON lines using DataFileConverter?
Can I convert CSV to JSON lines on Linux, Mac OS?
Can I convert CSV to JSON lines in command line?

More tools for JSONL / NDJSON / LDJSON.

CSV → JSON Lines reference

Type mapping

Value kindin CSVin JSON Lines
Int12341234 (number)
Decimal1234.561234.56 (number)
Float1.234e+101.234e10 (number)
Textquoted only when it contains a comma or a quote"text" (string)
Long textmust be quoted; line breaks inside force multi-line records"multi-line\ntext"
Date2026-09-18"2026-09-18" (string)
Datetime2026-09-18 14:30:00"2026-09-18T14:30:00Z" (string)
Binarynot representable - base64 or hex string"base64:..." (string)
BooleanTRUE / FALSE, or 1 / 0 depending on the writertrue / false (boolean)
JSONthe whole JSON value quoted, with internal quotes doublednested object on the same line

Dialect differences

Both CSV and JSON Lines are file formats, so what differs below is how each one chooses to represent a value.

Propertyin CSVin JSON Lines
identifiersDouble quotes; a literal quote is doubled ("" )Double quotes; backslash escapes (a newline inside a string...
datesConventional text: 2026-09-18 or 2026-09-18 14:30:00No date type: dates arrive as strings
binaryNot supportedNot supported natively - base64 inside a string
separatorComma ","Newline between records
encodingNo declaration - UTF-8 works only with a BOMUTF-8 by definition
typingNone - every field is textSame as JSON, but records cannot nest across lines
shapeFlat table, optional header rowFlat stream
ceilingNo formal limit; row count bounded by memoryStreams, so it scales past what a single JSON document can ...

Data File Converter without the manual work

For batch jobs, large files and scheduling use the Data File Converter converter — an offline desktop app for Windows, Linux and macOS. Free trial.


Posted

in

by