Free · Fast · Privacy-first

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

Runs in your browser
JSON output
Run the tool to see a task-specific result.

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
IframeResponsiveAttribution included

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. 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. 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. 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. 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. 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:

1

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.

2

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.

3

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.

4

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.

FAQ

Frequently asked questions

Two ways. Bracket-index headers like tags[0] and tags[1] for fixed-position arrays. Or single columns with pipe-delimited values like apple|banana split at conversion time. Pick the pattern that fits your data shape.
Pipe character | is the safest common choice because it rarely appears in normal text. Semicolon works in non-European locales. Avoid comma because it conflicts with CSV field separation. Test against your real data to confirm the delimiter is absent in values.
Yes, with combined notation: items[0].sku, items[0].qty for the first item, items[1].sku, items[1].qty for the second, and so on. Each items[N] entry becomes one object in the items array.
Trailing empty slots in bracket-index arrays are trimmed automatically. Middle empty slots become null in the array. For delimited-value arrays, empty strings between delimiters become empty string elements in the array.
No hard limit. Bracket-index arrays are limited by your CSV column count, which is practically bounded by what spreadsheet tools handle (a few hundred columns is reasonable). Delimited-value arrays are limited only by cell size.
Yes, per column. Bracket-index columns share the same type inference, so tags[0], tags[1], tags[2] are all the same type. Delimited-value arrays are typed based on the values themselves; if all values parse as numbers, the array is numeric.
In principle yes, but the converter defaults to consistent typing per array. If a bracket-index column has mixed values across rows the column falls back to strings. For mixed types per array element you typically need post-processing.
Standard JSON arrays inside object properties: { name: "abc", tags: ["x", "y", "z"], items: [{...}, {...}] }. Consumers iterate normally with for-of, map, or any other array method.
Yes, but only if your CSV does not use tabs as the field separator (which would conflict). Tab as in-cell delimiter works for comma-separated CSVs but not for TSVs.

Related guides

More use-case guides for the same tool:

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

Source-backed reference

JSON standards quick reference

Concise, standards-backed facts for developers working with JSON debugging and validation. Each rule links to a primary specification so it can be independently verified before you rely on it in code, documentation, or an incident report.

JSON standard
RFC 8259 defines JSON as a text format for serializing structured data. JSON values may be objects, arrays, strings, numbers, true, false, or null.
Verify in RFC 8259
Strings and object keys
JSON strings and object member names use double quotation marks. Single-quoted strings are not valid JSON syntax.
Verify in RFC 8259 §7
Trailing commas
The JSON grammar does not allow a comma after the final member of an object or the final element of an array.
Verify in RFC 8259 §4–5
Interoperability
ECMA-404 describes the JSON syntax independently of any programming language, which is why standard parsers can exchange the same JSON text across runtimes.
Verify in ECMA-404

Common invalid → valid JSON examples

Trailing comma

{"a":1,}{"a":1}

Single-quoted key

{'a':1}{"a":1}

Unsupported literal

{"score":NaN}{"score":null}

Built for verification, not just extraction

Direct answers are paired with primary sources and concrete examples. That makes this page useful to developers and also gives search and answer systems a clear, verifiable statement to reference instead of an unsupported summary.