CSV to JSON with Arrays
Spreadsheets are flat by nature, but JSON consumers often expect array properties: tags on a product, line items on an order, attachments on a record, alternative names on a person.
Native JSON tool
CSV to JSON
Bracket-index headers
Delimited cell splitting
Mixed array support
Browser-only conversion
- Cost
- Free tier
- Sign-up
- Not required
- Processing
- Tool-specific
- Privacy
- Clearly disclosed
Add this CSV to JSON to your website
Drop the CSV to JSON into a blog post, product docs, intranet, or school portal with one iframe. Processing, privacy, and usage limits are the same as on the full tool page.
- One copy-ready line of HTML
- Responsive — adapts to any container width
- No API credentials are placed in the snippet
Embed code
<iframe
src="https://www.fixtools.io/json/csv-to-json?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="CSV to JSON by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
Two clean patterns for arrays in CSV
The bracket-index pattern uses headers like tags[0] and tags[1] to denote positions in an array. FixTools sees the bracket notation in the header, groups all tags[N] columns into a single tags array per row, and places each cell value at the corresponding index. Empty trailing slots are trimmed so a row that only fills tags[0] and tags[1] but leaves tags[2] empty produces a two-element array rather than a three-element array with a trailing null. This pattern works well when the array length has a known upper bound, like up to five tags or up to ten options.
For arrays of objects use a combined notation: items[0].sku, items[0].qty, items[1].sku, items[1].qty. Each items[N] entry becomes one element of the items array, and the dot-prefixed sub-fields become properties of that object. The output is items: [ { sku: ..., qty: ... }, { sku: ..., qty: ... } ]. This pattern can represent surprisingly rich structures in a flat CSV, though it gets verbose for arrays with many properties or many positions.
The delimited-value pattern uses a single column with multiple values separated by a delimiter inside one cell. A column tags with cell value apple|banana|cherry becomes the array ["apple", "banana", "cherry"] when you enable the delimiter option and specify the pipe character. This pattern is more compact than bracket-index but requires the delimiter to be a character that does not appear in any actual value. Pipe and semicolon are common choices; commas are usually avoided because they conflict with CSV field separation.
You can mix both patterns in one CSV: some columns use bracket-index for fixed-position arrays, others use delimited values for variable-length arrays. The converter detects the bracket notation in the headers and applies the delimited-value split to columns you mark for splitting. This flexibility means you can pick the right representation per column based on how the data is authored and how complex the array contents are.
How to use this tool
Use bracket-index headers like tags[0], tags[1] for fixed-position arrays, or split delimited cell values for variable-length arrays.
How It Works
Step-by-step guide to csv to json with arrays:
- 1
Decide which array pattern fits your data
Bracket-index is best for arrays with a small fixed upper bound. Delimited values are best for variable-length lists of simple values. Mix as needed.
- 2
Set CSV headers accordingly
For bracket-index, label columns tags[0], tags[1], etc. For delimited values, use a single column tags and pick a delimiter character that does not appear in any value.
- 3
Configure the converter
Enable bracket-index parsing (on by default). For delimited columns, specify which columns to split and which delimiter to use.
- 4
Convert and inspect arrays
Check the preview to confirm arrays appear with the expected element counts. Trailing nulls in bracket-index arrays should be trimmed automatically.
- 5
Download
Save the JSON. The arrays are standard JSON arrays usable by any consumer with no further reshaping.
Real-world examples
Common situations where this approach makes a real difference:
E-commerce product tags
A product catalog CSV has a tags column with pipe-separated values like apparel|summer|sale. Conversion with the pipe delimiter produces real arrays in the JSON, ready for MongoDB or an e-commerce platform.
Order line items
An order export has items[0].sku, items[0].qty, items[1].sku, items[1].qty columns. Conversion produces an items array of objects per order, matching what the order management API expects.
Survey multi-select responses
A survey export has a column for multi-select answers stored as pipe-delimited values. Converting with the pipe delimiter gives an array per response, ready for analytics aggregation.
Alternative names or aliases
A contacts list has up to three aliases per person stored as alias[0], alias[1], alias[2] columns. Conversion produces an alias array of up to three strings, with empty trailing slots trimmed.
Pro tips
Get better results with these expert suggestions:
Pick delimiters that never appear in your data
Pipe characters and semicolons rarely appear in normal text data, making them safe choices. Commas conflict with CSV field separation. Tildes and carets work but are unusual. Test your delimiter choice against a sample of real data before standardising.
Use bracket-index for arrays of objects
Pipe-delimited values inside a cell only work for arrays of primitives. For arrays of objects you need bracket-index notation in headers because each element has multiple properties.
Trim trailing empty slots automatically
When bracket-index columns have empty trailing cells for some rows, the converter trims those slots so the output array length matches the actual data per row. This avoids confusing consumers with arrays of varying length filled with null padding.
Consider an array length cap
For bracket-index arrays, set a reasonable upper bound for the column count to avoid CSVs with hundreds of columns. If you need more flexibility, use delimited values in a single column instead.
Frequently asked questions
Related guides
More use-case guides for the same tool:
Related tools
Other tools you might find useful:
Ready to get started?
Open CSV to JSON to review its free limits and processing method.
Open CSV to JSON →Free tier · No account needed · Transparent limits