Skip to content

Csv To Ndjson API

POST https://api.findutils.com/api/tools/csv-to-ndjson/execute

Convert CSV into newline-delimited JSON (NDJSON, JSON Lines, .jsonl): one JSON object per line, keyed by the header row. Quoted fields, embedded line breaks and doubled quotes are read per RFC 4180; the delimiter is detected from the header when not given. Every value stays a string unless coerce is true, which turns true, false, null, an empty cell and plain numbers into JSON values while leaving leading zeros and integers of 2^53 or more as text. An empty header name becomes column_N and a duplicate gets a numeric suffix. A row wider than the header keeps the first N values and is reported by row number. Dotted header names are not rebuilt into nested objects.

Request body

application/json
  • csv

    string required

    CSV text with a header row.

  • delimiter

    string optional

    Input field separator: ",", ";", "\t" or "|". Omit to detect it from the header line.

  • coerce

    boolean optional

    Turn true, false, null, empty cells and plain numbers into JSON values. Default false: every value is a string. Default false.

  • header

    boolean optional

    The first row holds the keys. Default true. When false, keys are column_1, column_2, ... Default true.

Example arguments

Verified
{
  "csv": "id,name\n1,Ada\n2,Linus"
}