JSONL to CSV Converter

Convert JSON Lines (JSONL or NDJSON) to CSV in your browser. Nested objects become columns, large IDs stay exact, and lines that are not valid JSON are skipped and reported instead of stopping the whole conversion.

JSON Lines input

One JSON value per line

CSV output

Paste JSON Lines to get a CSV.

Options

How to convert JSONL to CSV

  1. Add your data. Paste JSON Lines, where each line is one JSON object, or drop a .jsonl, .ndjson or .json file. Files up to 25 MB load in the browser. Press Load sample to see an example.
  2. Check the columns. The first row lists every key found in any line. Nested objects become columns such as user.name, and lists are joined into one cell.
  3. Copy or download. Choose the delimiter, then copy the CSV or save it as a file you can open in Excel or Google Sheets.

There is no convert button. The CSV updates whenever the input or an option changes.

Before

{"id": 1, "user": {"name": "Ava"}, "tags": ["new", "vip"]}
{"id": 2, "user": {"name": "Ben"}, "tags": []}

After

id,user.name,tags
1,Ava,new; vip
2,Ben,

What JSONL is, and why it is not plain JSON

JSON Lines, also called NDJSON (newline-delimited JSON), is a text format with one complete JSON value on every line. There are no commas between the lines and no brackets around the whole file. Because each line stands alone, a program can read a file of any size one line at a time, and you can append a new record by adding a line.

You meet it in log pipelines, database and analytics exports, search-engine bulk files and training or batch datasets for machine-learning services. A spreadsheet cannot open it directly, and a normal JSON parser rejects it with an error at the end of the first line. If you saw an error like that, the guide to the unexpected token error explains why.

CSV has one row per record, which is the same shape, so the conversion is natural. The work is in the details: records that do not all have the same keys, nested objects, lists and lines that are damaged. The options below control each of those.

Options that change the CSV

OptionWhat it doesDefault
DelimiterComma, semicolon or tab. Many European spreadsheets expect a semicolon.Comma
Nested key separatorThe character that joins parent and child names: user.name, user_name or user/name.Dot
ArraysJoin simple lists into one cell with "; ", spread them over one column per item (tags.0, tags.1), or keep each list as JSON text.Join
Line endingsCRLF follows the CSV standard and is the safest for Excel. LF suits Mac and Linux tools.CRLF
Protect formulasAdds an apostrophe before text that starts with =, +, - or @, so a spreadsheet does not run it as a formula. Numbers are not changed.Off
Excel byte order markAdds a marker to the downloaded file so Excel reads it as UTF-8 and shows accented and non-Latin characters correctly.Off

What this converter does

Private by design
The conversion runs in your browser. Your lines are not uploaded, which matters when logs contain user IDs, emails or internal hostnames.
Numbers stay exact
A 20-digit ID such as 12345678901234567890 comes out unchanged, with no rounding and no scientific notation in the CSV text.
Bad lines do not stop the job
A line that is not valid JSON is skipped and counted. The status bar tells you how many were skipped and where the first one is, and Go to the error jumps to it.
Columns are the union of all keys
If a key appears in only some lines, it still gets a column, and the other rows have an empty cell there. Columns appear in the order the keys are first seen.
A normal JSON array works too
If your input starts with [ and is one valid JSON array of objects, each item becomes a row. For a single document with nested data, the JSON to CSV converter has more layout controls.
What a CSV cannot hold
CSV has no data types. A null becomes an empty cell, and true and false become the text true and false.

Opening the CSV in Excel

The CSV text is exact, but Excel decides how to display it when it opens the file. It shows long numbers in scientific notation and drops leading zeros. Two guides cover the fixes: long numbers and leading zeros in Excel, and garbled characters and the semicolon problem. For accents and non-Latin text, tick the byte order mark option before you download.

Frequently asked questions

How do I convert JSONL to CSV?

Paste the JSON Lines into the input box or drop a .jsonl or .ndjson file on the page. The CSV appears straight away. Choose a delimiter if needed, then press Copy or Download .csv.

What is the difference between JSONL and NDJSON?

In practice they are the same thing. Both mean a text file with one JSON value per line, separated by newline characters. JSON Lines and NDJSON are two names for nearly identical specifications, and this converter reads either.

What happens to nested objects and arrays?

Nested objects are flattened into columns named with the path, such as user.name. Lists of simple values are joined into one cell with a semicolon by default. You can also spread a list over one column per item, or keep it as JSON text inside the cell.

What if one line is not valid JSON?

That line is skipped and the rest are converted. The status bar reports how many lines were skipped and the line number of the first one, and the Go to the error button takes you there. Turning on the auto-fix option repairs common mistakes such as trailing commas and single quotes.

Do all lines need the same keys?

No. The CSV has a column for every key found in any line. Rows that lack a key get an empty cell in that column.

Is there a file size limit?

The tool loads files up to 25 MB in the browser. Large files can take a few seconds to convert. For files bigger than that, split the file into parts first, for example with the split command on Mac or Linux.

Is my data uploaded?

No. Everything happens in your browser tab and nothing is sent to a server.

Why does Excel show 1.23457E+19 or remove the leading zeros?

Excel converts anything that looks like a number when it opens a CSV, whatever the text in the file says. Import the file with the column set to Text, or follow the guide linked on this page.

Can I convert a normal JSON array instead of JSON Lines?

Yes. If the input starts with a square bracket and is one valid JSON array, each item in the array becomes a row.