Skip to main content

Array to CSV Converter

Convert code arrays and JSON arrays to CSV

Paste an array — a JSON array of objects, or a nested array of arrays — and get a CSV table back. It is the quickest way to move data out of a console log, an API response, or a code snippet and into a spreadsheet.

An array of objects uses the object keys as the header row, and keys are unioned across every element so objects with differing fields still line up in one consistent table. A nested array of arrays is treated as a raw grid, with the first inner array taken as the header.

Values containing commas, quotes, or line breaks are quoted and escaped properly, so the resulting file reopens with its columns intact rather than shifted.

Files stay on this deviceRuns entirely in your browserFree — no signup

Supported Formats:

  • JavaScript/JSON arrays
  • Python lists and dictionaries
  • PHP arrays
  • Ruby arrays and hashes
  • Array of objects or array of arrays

How to Convert

  1. Paste your array of objects or array of arrays
  2. Review the detected columns in the preview
  3. Confirm the header row is what you expect
  4. Download the CSV file

Features

  • Accepts arrays of objects and nested arrays of arrays
  • Uses object keys as the header row
  • Unions keys across elements so uneven objects still align
  • Proper CSV quoting for commas, quotes, and newlines
  • Preview the parsed table before downloading
  • Runs entirely in your browser — no upload

Use Cases

  • Turn a console log or debug dump into a spreadsheet
  • Convert an API response array into a shareable table
  • Move sample data out of code and into a document
  • Analyse a hard-coded fixture list in a spreadsheet
  • Hand structured data to colleagues who work in Excel

Frequently Asked Questions

What array formats are accepted?

A JSON array of objects, where each object is a record, or a nested array of arrays, treated as a raw grid with the first inner array as the header row.

Where does the header row come from?

From the object keys when you paste an array of objects, and from the first inner array when you paste a nested array.

What if my objects have different keys?

The header covers every key found across all elements, and objects missing a field get an empty cell rather than shifting their remaining values into the wrong columns.

Does it need to be strict JSON?

Standard JSON is safest. A JavaScript literal with unquoted keys or trailing commas may not parse, so wrap keys in double quotes if you hit an error.

What happens to nested objects inside the array?

Nested values are not spread into separate columns here. For deep flattening into dot-notation columns, use the JSON to CSV converter instead.

Is my data uploaded?

No. Parsing and conversion happen in your browser and the content is not sent to the app server.

Need to convert the other way? Try our Csv To Array