Overview
Introduction
Some scripts and libraries expect tabular data as a plain nested array rather than an array of keyed objects. This tool converts a CSV directly into that positional array-of-arrays shape.
It's a purely mechanical, position-preserving conversion: no assumptions are made about which row is a header, it's simply included as the first array.
What Is CSV to Array of Arrays Converter?
A CSV-to-JSON converter that stays entirely positional: it parses the CSV into a grid of rows and columns, then serializes that grid directly as a JSON array of arrays.
Every row, including the header, becomes one inner array of string cells.
How CSV to Array of Arrays Converter Works
The CSV is parsed with the shared RFC 4180-aware grid parser, which honors quoted fields containing commas or embedded newlines.
The resulting `string[][]` is passed straight to JSON.stringify with indentation, with no reshaping or key extraction involved.
When To Use CSV to Array of Arrays Converter
Use it when a downstream script or library expects tabular data as `data[row][col]` rather than an array of keyed objects.
It's also useful for quickly inspecting a CSV's raw row/column structure in JSON form.
Often used alongside Array of Arrays to CSV Converter and CSV Rows to Array Converter.
Features
Advantages
- Preserves the exact row and column layout of the source CSV with no restructuring.
- Correctly handles RFC 4180 quoting, including commas and newlines inside quoted fields.
- Simpler and faster than header-keyed conversion when you just need positional array access.
Limitations
- All values become strings; there's no automatic type inference for numbers or booleans.
- The header row isn't distinguished from data rows in the output: it's just the first array.
Examples
Best Practices & Notes
Best Practices
- Use CSV to JSON Converter instead if you want header-keyed objects rather than positional arrays.
- Remember to skip or slice off index 0 in your own code if you don't want the header row treated as data.
- Pair with Array of Arrays to CSV Converter to verify a round trip preserves your data.
Developer Notes
This tool intentionally does zero interpretation of the header row: some consumers of array-of-arrays data want the header included as the first row (e.g. to feed directly into a spreadsheet library's `setData` call), so stripping it here would just require the caller to re-add it.
CSV to Array of Arrays Converter Use Cases
- Feeding CSV data into a JavaScript spreadsheet or grid library that expects a 2D array
- Quickly inspecting a CSV's row/column layout in JSON form
- Preparing tabular data for a script that indexes by position rather than by column name
Common Mistakes
- Assuming the header row is stripped out automatically; it's included as array index 0 like any other row.
- Expecting numeric CSV values to become JSON numbers; every cell stays a string.
Tips
- If you need object-keyed access by column name instead, use CSV to JSON Converter.
- Slice off the first element in your own code if your downstream logic doesn't want the header row included.