How to convert between JSON, CSV and NDJSON
- Select your conversion mode: JSON → NDJSON, NDJSON → JSON, or CSV → NDJSON.
- Paste your data or open a
.json,.jsonl,.ndjsonor.csvfile. - Adjust options if needed (such as pretty-printing the JSON array or inferring numeric types from CSV).
- Copy the result or download it as a
.jsonlor.jsonfile.
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 .