My Tool Studio
Developer Tools·3 min read

JSON to CSV: Turn API Data Into Spreadsheet Rows

JSON is how APIs and apps hand you data. Spreadsheets want rows and columns. The JSON to CSV Converter bridges the two: paste a JSON array, press Convert to CSV, and each object becomes a row with its keys as column headers. You can download the result as .csv or as an Excel .xlsx file. It runs in your browser, so the data is never uploaded.

.json.csvJSON → CSV

What the converter does with your JSON

The short version.

Paste an array of objects and the tool reads every record, not just the first one. Each key becomes a column the first time it appears. If a key shows up in only some records, it still gets a column, and the rows without it leave that cell empty. The row and column count appears with the output, so you can check nothing went missing.

The input does not have to be a perfect array. A single object gives one row. An object that wraps one array, such as a data key holding your records, uses that array. For records that sit deeper, type their path, such as data.items, in Array path. JSON Lines, one object per line, is read too, and an array of plain values becomes one column named value.

Nested objects and arrays

Where many converters fall over.

API responses are rarely flat. With Flatten nested objects ticked, an address object with a city inside becomes a column called address.city. Deeper levels add more segments. Untick it to keep each nested object as JSON text in one cell.

Arrays follow the Arrays setting. Keep as JSON text writes a value like ["admin","beta"] in one cell, Join values with ; gives admin;beta, and One column per item makes tags.0 and tags.1 columns. None of them print [object Object].

Values that contain commas, quotes or line breaks are wrapped in double quotes, the way spreadsheets expect. True and false stay as words, numbers stay as written, and null becomes an empty cell. Tick Quote every value if the program reading the file wants every field quoted.

How to convert JSON to CSV

Three steps.

The flow is the same for ten records or ten thousand.

  • Paste your JSON, drop or upload a file, use Load URL, or press Try sample to load two nested records.
  • Set the delimiter, header row, flattening and Arrays options, then press Convert to CSV.
  • Check the Table preview, untick unwanted columns under Choose columns, then download .csv or .xlsx, or press Copy.

Opening the file in Excel or Google Sheets

What most people are really after.

If the data is headed for Excel, the .xlsx download is the simplest route. It gives a real workbook with a filter on the header row, and numbers and true or false stay real values, so Excel can sort and sum them.

Excel also opens CSV directly. The .csv download starts with a UTF-8 byte order mark by default, so accented characters show correctly. Some European versions of Excel expect semicolons and put everything in one column when you double-click a comma file. Pick Semicolon in the Delimiter menu before you download, and the columns split correctly. Tab gives a .tsv file instead. In Google Sheets, use File, Import and upload either format.

There is no PDF export. If you need one, open the file in a spreadsheet and use Print or Export to PDF.

Large files and the return trip

Limits worth knowing.

The conversion runs in your browser, so the practical limit is your device's memory. Very large files can make the tab slow. For those, a short script works well, for example pandas.json_normalize followed by to_csv in Python.

To go the other way, the CSV to JSON Converter turns a table back into an array of objects. Set its Nested keys option to split on a dot and headers such as address.city come back as nested objects. For other shapes, the JSON to XML Converter and JSON to YAML Converter cover those formats.

Fix the JSON first if it will not convert

Good input, good output.

If the tool reports an error, the input is not valid JSON. A trailing comma, single quotes or a comment are the usual causes. The JSON Validator shows the line and column of the problem, and its Fix common errors button repairs those slips in one go. Once it passes, paste it back here.

If you just need to read a large payload before deciding which fields you want, the JSON Formatter indents it so the structure is easy to follow.

Try it now

Open JSON to CSV Converter

The tool is one click away. No sign up, no upload, no payment.

Open JSON to CSV Converter