JSONL to CSV Converter
Paste JSONL, one JSON object per line, and get a CSV whose header is the union of every key across all rows in first-seen order. Rows that lack a key get an empty cell, nested objects and arrays are written as compact JSON in a single cell, and any value with a comma, quote or newline is quoted per RFC 4180. Flip the direction to turn a CSV back into JSONL.
How to convert JSONL to CSV
- Leave the JSONL to CSV button selected at the top of the tool.
- Paste your JSONL into the input box, with one JSON object per line and blank lines ignored.
- Read the CSV in the output box; an error names the first line that is not a valid JSON object.
- Click Copy to grab the CSV, or switch to CSV to JSONL to reverse the conversion.
Examples
Two records to CSV
{"name":"Ada","city":"London"}
{"name":"Alan","city":"Bletchley"}name,city Ada,London Alan,Bletchley
Union header fills a missing key with an empty cell
{"name":"Ada","city":"London"}
{"name":"Alan","city":"Bletchley","role":"cryptanalyst"}name,city,role Ada,London, Alan,Bletchley,cryptanalyst
Commas and quotes get RFC 4180 quoting
{"note":"Hello, world","q":"say \"hi\""}note,q "Hello, world","say ""hi"""
Frequently asked questions
What is JSONL?
JSONL, also called NDJSON or JSON Lines, stores one complete JSON object per line separated by newlines. It is common for logs, database exports, and streaming data because each line can be read and written independently.
How is the CSV header built?
The header is the union of every key seen across all lines, kept in the order each key first appears. If a later record introduces a new key, that column is appended to the right, and earlier rows leave it blank.
How are commas, quotes and newlines handled?
Any cell that contains a comma, a double quote, or a line break is wrapped in double quotes, and each inner quote is doubled. Cells without those characters are left unquoted. This follows RFC 4180 so spreadsheets read it correctly.
What happens to nested objects or arrays?
A nested value is serialized as compact JSON inside its cell, so a value like an array of two numbers becomes the text [1,2] in that column. If that JSON contains a comma it is quoted like any other special value.
How are null and missing values shown?
A JSON null and a key that a row simply does not have both render as an empty cell. Numbers and booleans are written as their plain text, so true stays true and 42 stays 42.
Can I convert CSV back to JSONL?
Yes. Click CSV to JSONL and the first row becomes the keys, then each following row becomes one JSON object per line. Every cell comes back as a string, since CSV does not record whether a value was a number or text.
Does the round trip preserve types?
Structure survives but types do not. Going JSONL to CSV and back leaves numbers, booleans and nested JSON as plain strings, because CSV has no type information to restore them from.
What line endings does the CSV use?
The generated CSV joins rows with CRLF, the carriage return plus line feed pair that RFC 4180 specifies, which is what Excel and most spreadsheet tools expect on import.
Is my data uploaded anywhere?
No. Both conversions run in your browser, so your JSONL and CSV never leave your device and nothing is logged or stored.
Learn more
- JSONL versus JSON and CSV for tabular data
How JSON Lines differs from a JSON array and from CSV, and when converting between them is the right move for exports and logs.
Related tools
JSON to CSV
Convert JSON to CSV online. Paste an array of objects and get clean, spreadsheet-ready CSV with the right headers. Runs in your browser.
CSV to JSON
Convert CSV to JSON online. Turn spreadsheet rows into clean JSON objects or arrays, with smart number and boolean typing. Free tier plus API.
Air Fryer Converter
Convert any conventional oven recipe to air fryer settings. Lower the temperature by 25 F and cut the cook time by about 20 percent automatically.
Baker's Percentage Calculator
Turn a bread formula into grams with baker's percentages. Flour is 100 percent, enter water, salt and yeast percents to get weights and hydration.
Baking Pan Converter
Swap one baking pan for another and scale the batter to fit. Compares pan areas for round, square and rectangular pans and gives a batter scale factor.
Binary to Decimal
Convert binary to decimal online. Paste any binary number, with or without spaces, and get the exact base-10 value instantly. Runs in your browser.