dataeng.tools

Convert JSONL to CSV — Free, Private, In-Browser

JSONL (NDJSON) is one JSON object per line — the shape of logs, event streams, and export dumps. CSV is a flat, untyped grid a spreadsheet or a COPY command can swallow. You convert JSONL to CSV when a human or a legacy loader needs rows, not records: a support export, a warehouse stage that only takes delimited text, a colleague who will not open NDJSON. The in-browser converter reads the file line-by-line with DuckDB's read_json_auto, unions keys into columns, and writes a headered CSV. Drop the file, preview the schema, download. Nothing is uploaded.

Lines do not have to share a shape. DuckDB samples records and unions every key it sees: a key present on some lines and missing on others becomes a nullable column, empty in the CSV where it was absent. Nested objects and arrays have no CSV equivalent, so they flatten to JSON strings in a single cell rather than exploding into columns. Mixed types — a field that is an integer on some lines and a string on others — widen, usually to text. JSON has no date type, so timestamp-looking strings land as VARCHAR unless they sniff cleanly. DuckDB infers from a sample; a rare key that only appears deep in the file can be missed.

A header row is written from the union of keys. Values with commas, quotes, or newlines are quoted per RFC 4180. JSON null becomes an empty field. Because JSONL repeats every key on every line while CSV writes each key once, the CSV is often smaller — but it is still uncompressed text, and you threw the types away. For analytics, JSONL to Parquet is the better hop; this page is the logs-to-spreadsheet hop. DuckDB-WASM runs locally; the JSONL never leaves your machine.

Drop a file or click to browse

Drop a JSONL file — processed locally, never uploaded

Frequently asked questions

My lines don't all have the same keys — is that a problem?
No. DuckDB unions every key it sees into one wide schema. A key missing from a line becomes an empty CSV field. The caveat: inference uses a sample, so a rare key deep in the file can be dropped. Reorder or bump sample size if a column goes missing.
What happens to nested objects and arrays?
CSV has no nested type, so each nested value is serialized to a JSON string inside one cell. If you need structure kept, convert to Parquet (STRUCT/LIST) or keep JSONL.
How is this different from JSON to CSV?
JSONL is one object per line with no enclosing array. DuckDB reads it line-by-line, which streams large log dumps better than a giant JSON array. The CSV shape is the same — this page targets the newline-delimited form.
Is my file uploaded anywhere?
No. The JSONL→CSV conversion runs entirely in your browser via DuckDB-WASM. Your file never leaves your device.
How large a file can I convert?
It's bounded by your browser's available memory rather than any server limit — files in the hundreds of MB are routine. DuckDB runs single-threaded here, so very large files just take a little longer.
Do I need an account?
No — it's free and requires no sign-up.

Do more with your JSONL file

Related conversions