Converters JSONL ⇄ CSV Converter

JSONL ⇄ CSV Converter

Convert newline-delimited JSON to CSV rows, or CSV back into JSONL. Works with files up to 200MB.

Or convert a file directly — supports files up to 200MB

Drag & drop a file here, or click to browse

Processed in the background, so the page stays responsive even for huge files

How to use this tool

Choose JSONL → CSV and paste log lines, or CSV → JSONL and paste a table with a header row. Upload takes .jsonl or .ndjson, or .csv the other way. A log file over 5 MB skips the editor: it is converted in the background, up to 200 MB, and the result downloads straight away.

Worked example: three log events

{"ts":"2026-09-26T10:00:00Z","level":"info","msg":"start"}
{"ts":"2026-09-26T10:00:02Z","level":"error","msg":"timeout","ms":5012}

{"ts":"2026-09-26T10:00:03Z","level":"info","msg":"retry","ctx":{"attempt":2}}

becomes

ts,level,msg,ms,ctx
2026-09-26T10:00:00Z,info,start,,
2026-09-26T10:00:02Z,error,timeout,5012,
2026-09-26T10:00:03Z,info,retry,,"{""attempt"":2}"

The blank line is skipped. ms appears only on the error event and ctx only on the last one, yet both get a column, added in the order they were first seen. The nested ctx object is written into its cell as JSON text, so a spreadsheet can filter on it but not on attempt alone. If you need nested fields as their own columns, convert to JSON first and then use the flatten converter.

Going back: what CSV → JSONL writes

Every column goes into every line, including empty ones. Converting the CSV above back gives "ms":"" on the start and retry events, not a missing key, and "ctx":"{\"attempt\":2}" as a string rather than an object. Plain numbers such as 5012 become numbers again, and the timestamps stay text. If whatever reads the JSONL expects a missing key, or a number, for ms, remove the empty values after converting.

Frequently Asked Questions

Why convert JSONL to CSV instead of keeping it as JSONL?

JSONL is great for streaming and line-by-line processing (log pipelines, ML training data) but awkward to review by eye or hand-edit in bulk. CSV opens directly in a spreadsheet, where sorting, filtering, and spot-checking records is far easier than scrolling through raw JSON lines.

What happens if one line in the middle of the file is broken?

Nothing is converted, and the error gives the line number as your editor shows it, blank lines included. A log that was cut off mid-write usually has a half-finished last line, so check the end of the file first. Delete or fix that line and the rest converts.

Can a line hold something other than an object?

It can, but only objects give you a header row, because their keys become the column names. A file where each line is an array, like ["2026-09-26", 5012], converts to bare rows such as 2026-09-26,5012 with no header line at all, so add one yourself before opening it in a spreadsheet.

Related Tools

Related Blog Posts