Staaarter

Array of Arrays to CSV Converter

Parses a JSON array-of-arrays literal, e.g. [["a","b"],["1","2"]], and serializes it back into RFC 4180 CSV text, quoting any cell that needs it. Non-string values (numbers, booleans, null) are stringified. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-29
By Staaarter Team
conversionstructured-data

Overview

Introduction

When a script or API produces tabular data as a plain nested JSON array, turning that back into a shareable CSV file usually means writing a small serializer by hand. This tool does that conversion directly, with correct RFC 4180 quoting.

It's the exact inverse of CSV to Array of Arrays Converter, so round-tripping through both preserves your data.

What Is Array of Arrays to CSV Converter?

A JSON-to-CSV converter for the array-of-arrays shape: it expects a JSON array whose elements are themselves arrays of values, one inner array per CSV row.

Every non-string value is stringified, and every cell is quoted according to RFC 4180 rules only when it actually needs it (contains the delimiter, a quote character, or a newline).

How Array of Arrays to CSV Converter Works

The input is parsed as JSON and validated to be an array whose every element is itself an array. Non-string cell values are converted with String(), and null/undefined become an empty string.

The resulting `string[][]` grid is passed to the shared CSV serializer, which quotes and escapes each cell only as needed before joining rows with newlines.

When To Use Array of Arrays to CSV Converter

Use it when a script, API response, or spreadsheet library gives you tabular data as a nested JSON array and you need a plain CSV file to share or import elsewhere.

It's the natural second half of a round trip through CSV to Array of Arrays Converter.

Features

Advantages

  • Produces correctly RFC 4180-quoted CSV, handling delimiters, quotes, and newlines inside cells automatically.
  • Accepts mixed value types (strings, numbers, booleans, null) and stringifies them sensibly.
  • Runs entirely client-side, so the data never leaves your browser.

Limitations

  • Every element of the outer array must itself be an array; a plain array of objects isn't accepted here (see CSV to JSON Converter's inverse for that shape instead).
  • There's no support for a delimiter other than comma in the current UI; edit the input if you need a different separator.

Examples

Converting a simple array of arrays

Input

[["id","name"],["1","Ada Lovelace"],["2","Alan Turing"]]

Output

id,name
1,Ada Lovelace
2,Alan Turing

Each inner array becomes one CSV row; no cell here needs quoting since none contain a comma, quote, or newline.

Best Practices & Notes

Best Practices

  • Make sure every inner array has the same length if you want a clean, non-ragged CSV output.
  • Include the header row as the first inner array if your downstream use of the CSV expects one.
  • Round-trip through CSV to Array of Arrays Converter to confirm no data was lost in either direction.

Developer Notes

Cell stringification uses String(value) rather than JSON.stringify(value), so a JSON string "Ada" becomes the bare CSV cell Ada rather than the quoted literal "Ada": this matches how a human would expect a CSV cell to look, not how the JSON source represented it.

Array of Arrays to CSV Converter Use Cases

  • Turning a script's or API's nested-array tabular output into a shareable CSV file
  • Converting a spreadsheet library's in-memory 2D array back into a CSV for storage or import elsewhere
  • Completing a round trip after editing data that started as CSV to Array of Arrays Converter output

Common Mistakes

  • Passing an array of objects instead of an array of arrays; this tool specifically expects the positional shape.
  • Forgetting to include a header row in the input array if the resulting CSV is expected to have one.

Tips

  • If your data started life as an array of objects, convert it to array-of-arrays form first (e.g. Object.values(obj)) before using this tool.
  • Check for ragged inner arrays (different lengths) before converting, since that produces an uneven CSV.

References

Frequently Asked Questions