How to convert JSON to CSV with TinyToolbox

Turn a JSON array into a spreadsheet-ready CSV, check how nested and missing values are exported, and resolve common import problems.

Open the tool

JSON is useful when records can contain lists, objects, and optional fields. A spreadsheet expects rows and columns. Converting between the two is easiest when you first decide what each row should represent. For a customer export, that might be one customer per row. For an order export, it could be one row per order or one row per line item. That decision determines which part of your JSON to paste into the converter.

TinyToolbox JSON to CSV takes a nonempty array of objects. It creates one row per object, collects every top-level key into the header, and writes a downloadable comma-separated file. You can check the output on the page before opening it in a spreadsheet. The conversion runs in your browser.

Convert your first array

Start with a few records that represent the full range of data you expect. Include a missing field, a name containing a comma, or a value that needs to stay in text format. A small sample makes mistaken column choices easier to spot.

  1. Open JSON to CSV.
  2. Paste your array into JSON input. You can also pick a JSON file in the upload area.
  3. Select Convert to CSV.
  4. Check the header and the sample rows in the converted output area.
  5. Copy the CSV if you need to paste it elsewhere, or download converted.csv.

Try this input:

[
  {"name":"Asha","region":"West","orders":4},
  {"name":"Quinn, Jr.","orders":2,"active":true},
  {"name":"Mina","region":"East","active":false}
]

The CSV is:

name,region,orders,active
Asha,West,4,
"Quinn, Jr.",,2,true
Mina,East,,false

The active column appears even though the first object has no such key. Quinn’s name stays in one cell because the converter encloses it in quotes. The empty field after Quinn’s name represents the missing region. The final comma in Asha’s row is significant because it marks the empty value in the last column.

Find the array if your JSON has a wrapper

An application export may include a status code, a timestamp, and the records all in one object. A common shape is {"total":2,"results":[...]}. The full object cannot be passed to this converter as-is. Copy the array assigned to results, including its square brackets, and paste that array into JSON to CSV.

Use JSON Formatter to inspect an unfamiliar response. Paste the JSON, format it, and locate the list you care about. Look at the object inside the first item to make sure it represents the right unit. If you want one row per transaction, an array of customer records is too high up the structure. If you want one row per customer, an array of transactions may repeat customers several times.

Avoid removing brackets from an array of one record. [{"name":"Asha"}] is a one-row dataset. {"name":"Asha"} is a single object and will be rejected. A list of values such as ["Asha","Mina"] also needs objects. Turn it into [{"name":"Asha"},{"name":"Mina"}] to give the column a heading.

Understand what becomes a column

Each top-level key is a candidate column. The converter discovers keys across all the rows, so an unexpected field near the end of a long export can add a column to the CSV. Review the complete header before loading that file into another system. If the destination expects a fixed set of columns, shape the JSON to that set before converting.

Capitalization and spelling are significant in JSON. customerId, customerID, and customer_id are three distinct keys, and each may become its own column. Standardize names upstream if those fields represent the same thing. When you control the source data and care about column order, put the expected fields on the first object in the desired order and use consistent keys across the rest. JavaScript gives integer-like property names special ordering, so use explicit descriptive keys for predictable headers.

Missing values and explicit null both export as blank cells. The CSV also shows an empty string as blank. If you need to distinguish “not collected,” “unknown,” and “deliberately left empty,” add a separate status column or use clear placeholder strings before converting. A round trip through CSV will not reconstruct those distinctions automatically.

Booleans are written as true or false. Numbers are written as text representations of the parsed number. A spreadsheet can then decide whether a cell is numeric, a date, a formula, or text. The CSV itself does not carry a schema to tell it what to do.

Choose how to handle nested values

Nested objects and arrays are serialized as compact JSON inside a cell. For example, a record whose delivery contains a city and a postal code can produce a single delivery column. That is appropriate when the destination stores the nested value as a blob of data or when the CSV is only a convenient way to inspect records.

If your spreadsheet needs to sort by city, make delivery_city a top-level field before converting. A record with both a city and a postal code can have delivery_city and delivery_postcode alongside its other ordinary columns. The converter does not invent names or automatically pull nested keys into columns, which leaves you in control of how the flattened data is labelled.

Consider an order with three items. You could keep the list in an items column if every row should still be one order. Or you could prepare a separate array that repeats the order number for each item and includes the product and quantity on each row. That second shape works if you need to total quantities by product. Take care with order-level fields such as a total invoice amount. Repeating an order total on each item row can accidentally triple it when you sum the spreadsheet.

Open the output in a spreadsheet

Open the download with your spreadsheet’s import command if you need control over how columns are interpreted. Select a comma as the separator. When commas occur inside a field, make sure the import treats double quotes as the text delimiter. The converter doubles a quote within a quoted cell, so a value such as She said "yes" remains one field.

Values with line breaks can be valid CSV cells. A plain-text editor may display a single record across two visual lines because the quoted field contains a newline. A CSV-aware spreadsheet importer should keep those lines together in one cell. If an application treats every newline as a new row, remove embedded line breaks from the source values or use a standards-aware importer.

Import identifiers, phone numbers, postal codes, and codes with leading zeroes as text. JSON "00123" exports as characters, but a spreadsheet may display it as 123 if the column is imported as a number. Very long identifiers should also be quoted strings in JSON. Once a large identifier has been parsed as an imprecise number, the converter cannot restore its original digits.

If your data came from an untrusted source, import potentially formula-like values as text. A string beginning with = can be interpreted as a formula by a spreadsheet application. CSV quoting serves the purpose of delimiting fields. It does not control how a spreadsheet evaluates a cell.

Convert a JSON file and verify the records

The file picker accepts one .json file at a time. The page reads it into the input field so you can see the same text that will be converted. The picker supports files up to 4 MB, and the one-million-character limit still applies to the decoded text. If your export is larger, make a smaller JSON file that contains a complete array. A cut through the middle of an object or string will make the partial file invalid.

For a repeatable export, write down what one row means and which columns are required. For example, an inventory file might contain one row per product listing, with productId, warehouse, and stock as its three required columns. A product that exists in two warehouses may legitimately appear twice. Compare row counts with the expected record count for those listings, rather than comparing the number of unique products to the number of rows.

Check that the imported spreadsheet agrees with the raw CSV before treating the workbook as your source of truth. One useful test is to find a record whose text includes punctuation, such as a product description containing a comma, and match every cell back to the JSON. Then check a row with a blank value. If the spreadsheet appears to have moved values across columns, revisit its separator and quote settings before changing the JSON.

When you plan to exchange the file with someone else, tell them whether blank cells have a special meaning and which columns are text identifiers. Two people can import the same file with different spreadsheet settings and see different displayed values. Sending the original JSON alongside the CSV can help when they need to audit the conversion or recover detail.

Troubleshoot the conversion

The tool says the JSON is invalid. Check for a trailing comma before a closing bracket, single quotes around a property name, or a missing quote in a string. JSON requires double quotes around object keys and text values. Format the input first to isolate syntax problems.

The tool asks for a nonempty array of objects. Find the records array inside the export. A bare object, an empty array, or an array of numbers does not supply the structure needed for a table. For a one-record export use an array containing that object.

Everything appears in one column. The CSV may be valid and the spreadsheet may be using a semicolon or tab as its default separator. Import the file explicitly and choose comma. Maintain the quote setting so commas inside a cell do not create extra columns.

Some columns are empty for most rows. Look for inconsistent key names or objects that omit optional data. If the fields are intentionally different by record type, you may get a more readable result by converting each record type separately.

The input is too large. The converter accepts up to one million input characters. Output rows times header columns may not exceed 250,000 cells. If you can split the export, use the same schema and header order for each part. A later export that discovers a different set of keys can make concatenating the CSVs unreliable.

Check the result before you use it

Compare the header to what the destination expects. Spot-check a typical row, the first and last rows, and records with quotes, commas, long identifiers, or missing values. Test a small file in the destination before you rely on it for a bulk upload.

If you need a workbook, CSV to Excel can turn pasted CSV with a header into XLSX cells stored as text. If you need the data back as objects, CSV to JSON reads CSV fields as strings, so preserve the original JSON if numeric types and nesting matter. A successful conversion makes the data usable for the next step. Keeping the source alongside the export makes mistakes easier to fix.