Skip to content

NDJSON / JSON Lines Converter

Convert between JSON arrays and newline-delimited JSON (.jsonl), or turn CSV rows directly into JSON Lines.

Processed in your browser. Your data is not uploaded, stored or logged — closing the tab discards it. How this works

NDJSON options Show
Conversion mode

Each element of the input JSON array is written on its own line with no unescaped line breaks. Numbers keep their exact digits.

Changes apply automatically.

JSON input

Paste data, choose a file, or load the sample.

You can also drag and drop a file here.

NDJSON output

The converted output appears here.

How to convert between JSON, CSV and NDJSON

  1. Select your conversion mode: JSON → NDJSON, NDJSON → JSON, or CSV → NDJSON.
  2. Paste your data or open a .json, .jsonl, .ndjson or .csv file.
  3. Adjust options if needed (such as pretty-printing the JSON array or inferring numeric types from CSV).
  4. Copy the result or download it as a .jsonl or .json file.

JSON Array vs NDJSON (.jsonl)

A standard JSON array wraps records in [ … ] with commas between items:

[
  {"id": "00142", "event": "signup", "plan": "pro"},
  {"id": "00143", "event": "upgrade", "plan": "team"}
]

In NDJSON (JSON Lines), each record is a self-contained JSON line with no outer brackets and no trailing commas:

{"id":"00142","event":"signup","plan":"pro"}
{"id":"00143","event":"upgrade","plan":"team"}

Because each line stands alone, command-line tools (head, wc -l, grep, jq -c) and streaming ingestion engines can process gigabytes of records one line at a time.

Frequently asked questions

What is NDJSON (JSON Lines)?

Newline-delimited JSON — also called JSON Lines (.jsonl) — stores one complete, compact JSON value on each line, separated by a line break (\n). Unlike a standard JSON array, it can be read and appended line by line without loading the entire file into memory.

Where is NDJSON used?

Cloud data warehouses (BigQuery, ClickHouse, DuckDB, Snowflake), log pipelines (Elasticsearch, Vector, Fluentd), and AI fine-tuning or batch APIs (OpenAI, Anthropic, Vertex AI) all expect .jsonl files.

Are 64-bit IDs and leading zeros safe?

Yes. The JSON modes use a lossless parser that keeps numbers as their exact source text, so 64-bit IDs above 9,007,199,254,740,991 are never rounded. In CSV → NDJSON mode, every value stays a string unless you turn on type inference, which only converts values that round-trip identically.

What if my JSON is an object wrapping an array?

If the top-level JSON is an object such as {"data": [...]} or {"records": [...]}, the converter automatically extracts the first array property and writes its items one per line, noting which property it used.

How does NDJSON → JSON report syntax errors?

Each non-blank line is validated independently. If line 42 has a missing quote or trailing comma, the error message points directly to line 42 and the exact column.

Last updated .