JSON to CSV converter, nested JSON and JSON Lines too
JSON records as a CSV, in your browser. Nothing is uploaded.
Open a JSON file to convert it to CSV
Drop it here or choose a file. See it as a table, then download it as a CSV.
The sample: 72 made-up hourly weather readings from three UK cities, with nested fields.
Tip: drop several files to compare them.
Your file never leaves your device. It is read and charted by your browser. Nothing is uploaded.
Opens on the table, a row per record
- View
- The table, every record; the chart is one click away (Split or Chart).
- Columns
- Every key of any record, in the order the keys first appear; nested objects as path.to.field.
- Download
- “Download as CSV” over the table: every column and every record.
- Digits
- 15 significant digits; “Full precision (17 digits)” under “Do more” writes every digit.
At a glance
- Opens
- JSON files (.json) and JSON Lines (.jsonl, .ndjson: one record per line).
- Records
- An array of objects, each a row; every key of any record is a column, in the order the keys first appear.
- Nested objects
- Flattened into columns named by their path: reading.wind.speed.
- Arrays in a record
- Kept whole as JSON text in one cell: ["ice"].
- Missing and null
- A record without a key, or with null, has an empty cell.
- Values
- Numbers with 15 significant digits, true and false as TRUE and FALSE, ISO times such as 2025-01-15T09:00:00Z as 2025-01-15 09:00:00.
- Other shapes
- Records inside an object ({"data": [...]}), pandas’ split format, an object of equal-length arrays, arrays of rows and arrays of plain values.
- Size
- A top-level array or JSON Lines has no fixed limit; the practical limit is your device. A file with an object at the top is read up to 268 MB.
- Processing
- Converted in your browser. Your file is never uploaded.
- Price
- Free. No account or sign-up.
How to convert JSON to CSV
- Open your JSON file. Choose a .json, .jsonl or .ndjson file, or drop it on the tool at the top of this page. No file to hand? Click “Try a sample JSON file”.
- Check the table. The records open as a table: one row per record, one column per field, nested fields named by their path. Scroll through it to check the columns.
- Download the CSV. Click “Download as CSV” over the table (or “Download all columns (CSV)” under “Do more”). The CSV holds every record and every column.
Which JSON becomes a table
Most JSON that holds data is a list of records, but not all of it is. These shapes open as a table:
| Shape | Example | Becomes |
|---|---|---|
| An array of records | [{"city": "Leeds", "temp": 4.2}, …] | A row per record, a column per key. |
| JSON Lines | {"city": "Leeds", "temp": 4.2} (one per line) | The same: a row per line. Lines that are not JSON are skipped and counted. |
| Records inside an object | {"data": [{…}, {…}]} | The records of the array; a note names where they were found. |
| pandas’ split format | {"columns": ["city", "temp"], "data": [["Leeds", 4.2], …]} | The columns named, a row per inner array. |
| An object of arrays | {"time": [0, 1, 2], "temp": [4.2, 4.0, 3.9]} | A column per key, when the arrays have the same length. |
| An array of rows | [["city", "temp"], ["Leeds", 4.2], …] | A row per inner array; a first row of names only is the header. |
| An array of values | [4.2, 4.0, 3.9] | One column, “value”. |
When an object holds several arrays of records, the one with the most records-like items is read and the note names the others it left out. Anything else, such as a single object with no array in it, opens as a table of one row.
Nested objects, arrays and missing fields
- Nested objects are flattened into columns named by their path, with dots between the names:
{"reading": {"wind": {"speed": 8.7}}}gives the columnreading.wind.speed. - Arrays inside a record stay whole, as JSON text in one cell:
["ice"], written to the CSV as"[""ice""]"(a CSV doubles the quotes inside a quoted field). They are not spread over extra rows or numbered columns, so every record stays exactly one row. - Missing fields and null give an empty cell. The columns are every key of any record, in the order they first appear, so a field that only some records have still gets its column.
- Values: numbers with 15 significant digits, true and false as TRUE and FALSE, text as it is, and ISO times such as
2025-01-15T09:00:00Zas2025-01-15 09:00:00(UTC, as in the file).
A worked example you can check
“Try a sample JSON file” opens 72 made-up hourly readings from Leeds, Cardiff and Belfast on 15 January 2025. Each record nests the station and the reading, has an alerts array, and only rainy hours have a rainfall. The first record:
{"time": "2025-01-15T00:00:00Z", "station": {"city": "Leeds", "code": "LDS"}, "reading": {"temperature": 2.0, "humidity": 88, "wind": {"speed": 8.7, "direction": "NE"}, "rainfall": 0.8}, "raining": true, "alerts": []}Click Download as CSV, and the CSV, with its 10 columns, starts like this:
time,station.city,station.code,reading.temperature,reading.humidity,reading.wind.speed,reading.wind.direction,reading.rainfall,raining,alerts
2025-01-15 00:00:00,Leeds,LDS,2,88,8.7,NE,0.8,TRUE,[]
2025-01-15 00:00:00,Cardiff,CDF,4.3,94,8.2,W,,FALSE,[]The Leeds record an hour later, with an ice alert and no rainfall, becomes:
2025-01-15 01:00:00,Leeds,LDS,0.6,89,13.9,S,,FALSE,"[""ice""]"One reading has a null temperature and three have no wind direction: their cells are empty. A test opens the sample on every change to the site and compares its CSV with the file we expect, byte for byte, and does the same with the records written as JSON Lines. Download the sample file (JSON, 15 KB).
The same in Python
pandas’ json_normalize flattens nested objects the same way. On the sample file:
import json, pandas as pd
records = json.load(open("megarows-sample-uk-weather-readings.json"))
table = pd.json_normalize(records)
print(len(table), "rows,", len(table.columns), "columns")
print(table.to_csv(index=False).splitlines()[4])It prints:
72 rows, 10 columns
2025-01-15T01:00:00Z,False,['ice'],Leeds,LDS,0.6,89,13.9,S,The same 72 rows and 10 columns, in another order. pandas keeps the time as the text of the file and writes arrays the Python way (['ice']), where the CSV from this page has JSON (["ice"]), which other programs can read back. We ran it on 9 October 2026 with numpy 2.1.3, pandas 2.2.3, Python 3.12.15.
Private by design: nothing is uploaded
API exports and logs can hold customer or test data. This tool reads your file and writes the CSV in your browser, so the file and its name never leave your device. Big exports open too: JSON Lines and arrays of records have no fixed size limit, and the practical one is your device’s memory.
Next steps with your data
- Excel to CSVAny sheet of an .xlsx or .xlsm workbook as a CSV.
- JSON to MATThe same records as a MATLAB .mat file, a field per column.
- Large CSV viewerScroll, sort and filter the table, millions of rows too.
- CSV statisticsMean, standard deviation, min and max of any column.
- CSV plotterChart any field of the records over time.
Frequently asked questions
How do I convert JSON to CSV?
Open the JSON file in the tool at the top of this page: it opens as a table. Click “Download as CSV” over it. Your browser reads the file on your own device and saves the CSV, with one row per record and one column per field.
What happens to nested JSON?
Nested objects are flattened into columns named by their path: {"reading": {"wind": {"speed": 8.7}}} gives a column reading.wind.speed. Arrays inside a record are not spread over rows or columns: each stays whole, as JSON text, in one cell, such as ["ice"].
Does it read JSON Lines (NDJSON)?
Yes: .jsonl and .ndjson files, one record per line, give the same table as the same records in one array. A line that is not valid JSON is skipped, and a note says which lines were.
What if my records have different fields?
Every key that appears in any record becomes a column, in the order the keys first appear. A record without a key, or with null, gets an empty cell in that column.
How big can the file be?
A file that is one array of records, or JSON Lines, has no fixed limit: it is read record by record, and the practical limit is your device’s memory. A file whose top level is an object has to be read whole, up to 268 MB; for bigger files, write the records as an array or as JSON Lines.
Is my file uploaded?
No. The file is read and the CSV is made by your browser, on your own device. Neither the file nor its name is sent anywhere; you can check it in the Network tab of your browser’s developer tools.
Related tools and guides
- CSV plotterOpen a CSV, Excel, TXT, JSON, MATLAB, Parquet, HDF5 or LabVIEW TDMS file with millions of rows and plot it in several linked charts, with zoom and statistics. Works today.
- Large CSV viewerOpen a CSV with millions of rows in your browser: scroll every row, see each column’s type and statistics, chart any column. Works today.
- MATLAB .mat file viewerOpen v4 to v7.3 .mat files without MATLAB and plot any signal. Works today.
- Parquet viewerOpen large .parquet files, see the schema at once and plot millions of rows, without Python. Works today.
- TDMS viewerOpen .tdms files from LabVIEW, DIAdem and DAQmx loggers: every group, channel and property, each channel plotted against its time. Works today.
- HDF5 viewerOpen .h5, .hdf5 and NetCDF-4 .nc files: every group, dataset and attribute, each group’s datasets plotted against their time. Works today.
- MAT to CSVConvert the signals of a .mat file, v4 to v7.3, to a CSV for Excel or Python, without MATLAB. Works today.
- Parquet to CSVConvert a .parquet file to CSV in your browser, with the columns you pick. Works today.
- TDMS to CSVConvert the channels of a .tdms file to CSV, a group at a time, with its time column, without LabVIEW or Excel add-ins. Works today.
- HDF5 to CSVConvert the datasets of an .h5 or NetCDF-4 file to CSV, a table at a time, with its time column, without Python. Works today.
- Excel to CSVConvert any sheet of an .xlsx or .xlsm workbook to CSV, with the saved results of formulas, real dates and 15 significant digits. Works today.
- CSV to MATConvert a CSV, Excel, JSON or Parquet file to a MATLAB .mat file: a field per column, with names and units, every row. Works today.
- Merge CSV filesAppend many CSV files into one, even with different columns or separators. Works today.
- Split CSV filesSplit a CSV too big for Excel into parts of 1,000,000 rows, parts of a size you choose, or one file per value of a column. Works today.
- CSV row counterCount the lines in a CSV, TSV or TXT file of any size. Works today.
- CSV statisticsCount, missing values, min, max, mean, standard deviation, RMS and peak to peak of each number column, for the whole file or the rows you zoom into. Works today.
- CSV histogramA histogram of any number column, with automatic bins or 10 to 200 of them, and each bin’s count as a table. Works today.
- CSV too large for Excel?Open every row of a CSV beyond Excel’s 1,048,576-row limit, or work around the limit in six other ways.
- FFT and PSD from a CSVTurn a signal column into an FFT spectrum or a PSD with Grms, with results checked against SciPy. Works today.
- PSD calculatorTurn a vibration column into a power spectral density (Welch) in g²/Hz, with the Grms of any band and a dB view. Works today.
- Spectrogram from CSVSee how the frequencies of a measured signal change over time, as a heat map in dB, with the window and range you choose. Works today.
- FRF and coherencePick an input and an output column and get the frequency response (H1, H2, magnitude and phase) and their coherence. Works today.
- The MegaRows toolboxWhat works today and what is coming next, and why nothing is ever uploaded.
Coming soon to MegaRows: CSV to Excel and PDF reports · Compare CSV versions.
MegaRows processes files locally in your browser. Nothing is uploaded, not even the file name.