Free · Fast · Privacy-first

JSON Array to CSV

A JSON array of objects is the canonical shape API designers reach for when returning lists, and it maps almost perfectly to a CSV: one object becomes one row, one key becomes one column.

Native JSON tool

JSON to CSV

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

One row per array element

🔒

Handles mixed object schemas

Empty arrays produce header-only CSV

Configurable column order

Cost
Free tier
Sign-up
Not required
Processing
Tool-specific
Privacy
Clearly disclosed
IframeResponsiveAttribution included

Add this JSON to CSV to your website

Drop the JSON to CSV 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/json-to-csv?embed=1"
  width="100%"
  height="780"
  frameborder="0"
  style="border:0;border-radius:16px;max-width:900px;"
  title="JSON to CSV by FixTools"
  loading="lazy"
  allow="clipboard-write"
></iframe>

Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.

How arrays of objects map cleanly to CSV rows

The fundamental mapping is intuitive. Given a JSON array like [{"id":1,"name":"Ada"},{"id":2,"name":"Babbage"}], the natural CSV is a two-row table with columns id and name. The converter scans every object in the array to compute the union of all keys present, so a record that has an extra field does not silently drop it, and a record missing a field gets an empty cell rather than a misaligned row. This union-of-keys approach is more forgiving than picking the keys from only the first object, which is what some simplistic converters do, and it matches what analysts expect when they ask for "all the data" rather than "the data the first record has".

Mixed schemas are common in real-world data. APIs evolve, optional fields appear in some records but not others, and pagination boundaries can introduce gaps. FixTools handles these gracefully by computing the column union before writing any rows. Empty cells stay empty rather than being filled with the string null or with a placeholder, which preserves the analyst's ability to use spreadsheet functions like ISBLANK and COUNTBLANK to detect coverage gaps. If you specifically want null cells to read as the literal text NULL, you can change that in the options panel.

Nested objects in array elements are flattened with dotted column names by default. A record { id: 1, address: { city: "London", zip: "EC1" } } produces columns id, address.city, and address.zip. This convention is widely understood across the data world. Pandas json_normalize uses it, jq paths produce the same shape, and BigQuery and Snowflake column names support it natively. If your downstream consumer prefers underscores to dots, you can switch the separator in the options.

Arrays inside array elements are the most ambiguous case. The default behaviour is to JSON-encode the inner array as a single cell, so tags: ["a", "b"] becomes the cell content ["a","b"]. This preserves information without exploding the row count. If your downstream tool needs each tag on its own row, switch the array handling option to Explode and the converter will duplicate parent fields across as many rows as the inner array has elements. Different consumers want different shapes here, so the converter exposes the choice explicitly rather than guessing.

How to use this tool

💡

Paste a JSON array of objects and convert one row per element with the union of all keys as columns, ready for any spreadsheet.

How It Works

Step-by-step guide to json array to csv:

  1. 1

    Paste the JSON array

    Paste the JSON array directly into the editor. If your JSON is wrapped in an envelope object such as { data: [...] }, point the converter at the data path so it knows which array contains the records to convert.

  2. 2

    Confirm the detected columns

    The preview shows the union of keys discovered across all array elements. Toggle columns off to exclude them, or drag them into a different order if your downstream consumer expects a specific column sequence.

  3. 3

    Choose array and nested-object handling

    For nested objects, the default is flatten with dot notation. For inner arrays, the default is JSON-encode into a single cell. Switch to Explode if the downstream tool needs one row per inner item.

  4. 4

    Download and verify

    Download the CSV and open it in your spreadsheet. The header row lists every column found across the array, and each subsequent row matches one element from the array in source order.

Real-world examples

Common situations where this approach makes a real difference:

Engineer exporting REST API list endpoint

A backend engineer needs to share the output of a /users endpoint with the product team. The endpoint returns a JSON array of 1,200 user objects with mixed optional fields. FixTools computes the union of keys, produces a CSV where missing fields show as blanks, and the product team opens it in Sheets and sorts by signup date in seconds.

Researcher converting survey JSON

A UX researcher has an array of 400 survey responses as JSON, each with a nested demographics object. FixTools flattens demographics into dotted columns and the researcher pivots responses by age and region in Excel without writing any code.

Game dev pulling leaderboard JSON

A game developer pulls leaderboard data from their backend as a JSON array of score objects. They want to share the top 100 with a community moderator who works in Google Sheets. The converter produces a clean CSV with one row per player and the moderator opens it directly in Sheets.

Sales ops cleaning Salesforce export

A sales operations analyst exports opportunities from Salesforce as a JSON array. Some records have campaign attributions, others do not. FixTools handles the union-of-keys cleanly so the analyst can filter on campaign without writing a lookup formula.

Pro tips

Get better results with these expert suggestions:

1

Check array length before converting

The preview displays array length before you commit to the conversion. If the number does not match what you expected, you may have pointed the converter at the wrong array path inside an envelope object. Adjust the path before generating the full CSV.

2

Watch for mixed types in the same column

When one element has age: 30 and another has age: "thirty", the column ends up mixed-type in the CSV. Spreadsheet tools handle this badly. If you spot mixed types in the preview, clean the source JSON or apply a transform in your downstream pipeline before analysis.

3

Sort the array before converting if order matters

CSV preserves array order verbatim. If you want the output sorted by a specific field, sort the JSON array first in your source code or with jq. Sorting after the fact in a spreadsheet is easy too, but pre-sorting produces a CSV that is meaningful in source order without further work.

4

Be deliberate about flatten depth

For arrays where each element has shallow nesting, full flatten is fine. For arrays where each element has deeply nested sub-objects with many fields, full flatten can produce hundreds of columns and overwhelm spreadsheet users. Limit flatten depth to 2 or 3 levels for human-friendly output.

FAQ

Frequently asked questions

The converter computes the union of all keys across every element in the array and uses that as the column set. Records missing a key get an empty cell for that column, and records with extra keys contribute those keys to the overall column list. This is the safest default behaviour because it preserves all data and matches how most analysts think about mixed-schema collections.
The output preserves the order of elements in the source array. The first element becomes the first row after the header, the second element becomes the second row, and so on. If you need a different order, sort the JSON array before converting, or sort the CSV after opening it in your spreadsheet.
The converter produces a CSV with the detected header row and no data rows. If the array is genuinely empty with no objects at all, the converter has no schema to infer and produces an empty file. In that case, check the JSON source to make sure the array path is correct and not pointing at an unexpectedly empty collection.
Yes. The preview lists every detected key with a toggle. Turn off the toggle for any key you do not want in the output. The unchecked keys are excluded from the generated CSV but stay in the source JSON, so you can iterate freely without losing data.
Null values produce empty cells by default, which lets spreadsheet functions like ISBLANK detect them. If you prefer the literal string null, NULL, or a specific placeholder such as N/A, change the null handling option in the panel. Be consistent with what your downstream tool expects to avoid filter surprises.
If some elements are primitives such as strings or numbers and others are objects, the converter treats the primitive elements as a single value column. This is unusual data and usually indicates a source bug, so check the JSON before deciding how to handle it. If you genuinely want a flat list of primitives, paste only the primitive array, which converts to a one-column CSV.
JSON forbids duplicate keys within an object at the spec level, so a well-formed input will not have them. If your JSON does have duplicates because of a non-conforming producer, most JSON parsers including the one FixTools uses will keep only the last occurrence of each duplicate key. Run the JSON through a validator before converting if you suspect duplicates.

Related guides

More use-case guides for the same tool:

Ready to get started?

Open JSON to CSV to review its free limits and processing method.

Open JSON to CSV →

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.