PublicSoftTools
Tools16 min read·PublicSoftTools Team·June 2026

JSON to CSV Converter Online Free — Complete Guide

APIs return JSON, but spreadsheets expect CSV. The free JSON to CSV Converter transforms JSON arrays into spreadsheet-ready CSV rows instantly in your browser. Each object key becomes a column header, each array item becomes a row — no server, no upload, no signup.

When You Need JSON to CSV Conversion

The most common scenario: you get data from an API, database, or web application in JSON format, and you need to send it to a stakeholder who works in Excel or Google Sheets, import it into a CRM, upload it to an email marketing platform, or process it with a business intelligence tool that expects CSV.

JSON-to-CSV conversion happens constantly in real workflows:

JSON Structure Requirements for CSV Conversion

Not all JSON can be directly converted to CSV. CSV is a flat tabular format — it has rows and columns, but no nesting. JSON supports arbitrary nesting, arrays within objects, and objects within arrays. The cleanest input for CSV conversion is:

[
  { "name": "Alice", "age": 32, "city": "London" },
  { "name": "Bob", "age": 28, "city": "New York" },
  { "name": "Carol", "age": 45, "city": "Sydney" }
]

This produces a clean CSV:

name,age,city
Alice,32,London
Bob,28,New York
Carol,45,Sydney

The rules: the input must be a JSON array of objects. Each object should ideally share the same keys (the first object's keys are used to generate the header row). Objects with missing keys produce empty cells for those columns.

How JSON Maps to CSV

JSON InputCSV OutputNotes
Array of objectsHeader row + one data row per objectStandard array-to-table mapping
String valueQuoted cell (if contains comma or newline)Unquoted otherwise; commas trigger quoting
Number valueUnquoted numeric cell42 → 42, 3.14 → 3.14
Boolean valuetrue/false texttrue → true, false → false
null valueEmpty cellnull becomes an empty CSV field
Nested object valueStringified JSON in a single cellCannot represent nesting in flat CSV
Array valueStringified JSON in a single cellArrays require flattening for readable columns
Missing keyEmpty cellObjects with fewer keys than the header get empty cells

How to Convert JSON to CSV — Step by Step

  1. Open the tool. Navigate to the JSON to CSV Converter.
  2. Paste your JSON array. Paste a JSON array of objects into the input panel. The tool validates the JSON first — invalid JSON shows an error message.
  3. Review the CSV output. The CSV appears in the right panel. Verify that headers match your expected column names, values are correctly formatted, and nested values are handled appropriately.
  4. Copy or download. Click Copy to copy the CSV to your clipboard, or Download to save as a .csv file. Open directly in Excel or Google Sheets.

Handling Nested JSON — Flattening Strategies

The most common challenge in JSON-to-CSV conversion is handling nested objects and arrays. CSV cannot represent nesting directly — you have two choices:

Strategy 1: Stringify nested values (default)

The converter serializes nested objects and arrays as JSON strings in a single cell:

// Input
{ "name": "Alice", "address": { "city": "London", "zip": "SW1A 1AA" } }

// CSV output (nested object serialized)
name,address
Alice,"{""city"":""London"",""zip"":""SW1A 1AA""}"

Note the double-quoted JSON inside a double-quoted CSV field — the inner quotes are escaped by doubling them, per RFC 4180. This preserves all data but makes the nested content hard to work with in a spreadsheet.

Strategy 2: Flatten before converting

A better approach for nested data is to flatten the JSON before converting. Flattening creates separate columns for each nested key, using dot notation or underscores as separators:

// Flatten the JSON first
function flattenObject(obj, prefix = '') {
  return Object.keys(obj).reduce((acc, key) => {
    const pre = prefix.length ? prefix + '_' : '';
    if (typeof obj[key] === 'object' && obj[key] !== null && !Array.isArray(obj[key])) {
      Object.assign(acc, flattenObject(obj[key], pre + key));
    } else {
      acc[pre + key] = obj[key];
    }
    return acc;
  }, {});
}

const flatData = data.map(obj => flattenObject(obj));
// Then convert flatData to CSV

// Result columns: name, address_city, address_zip
// Instead of: name, address

Strategy 3: Select only needed fields

If you only need a subset of fields from a complex JSON structure, select them before converting:

// Select only the fields needed for CSV
const selected = data.map(obj => ({
  name: obj.name,
  city: obj.address?.city,
  country: obj.address?.country,
  tag_count: obj.tags?.length ?? 0
}));
// Then convert selected to CSV

Opening CSV in Excel — Import Considerations

Opening CSV files in Microsoft Excel has several nuances:

Double-clicking a CSV file

When you double-click a .csv file in Windows Explorer, Excel opens it using its default regional settings for delimiter detection. In regions where commas are the decimal separator (most of continental Europe), Excel may not correctly parse comma-delimited CSV. The downloaded file may not display correctly if Excel misdetects the delimiter.

Using the Text Import Wizard

For reliable import, use Excel's Data tab → Get Data → From Text/CSV (modern versions) or Data tab → From Text (older versions). This opens the import wizard, where you can explicitly specify the delimiter, text qualifier (quote character), and column data types.

Leading zeros in numeric-looking fields

Excel automatically converts cells that look like numbers — stripping leading zeros. A ZIP code 01234 becomes 1234, an account number007890 becomes 7890. To prevent this:

Date format recognition

Dates in CSV may be parsed by Excel according to regional settings. ISO 8601 format (2026-06-17) is consistently recognized by Excel as a date in most regions. Other formats may be misinterpreted — 06/17/2026 is a date in US regional settings but reads as text in UK settings.

Use Cases — JSON to CSV in Practice

Exporting REST API data for review

You call a REST API that returns a JSON array of records:

// API response
[
  { "id": 1, "name": "Product A", "price": 29.99, "stock": 142 },
  { "id": 2, "name": "Product B", "price": 49.99, "stock": 0 },
  { "id": 3, "name": "Product C", "price": 9.99, "stock": 847 }
]

Copy the JSON, paste it into the converter, download the CSV, and share with the product manager for review in Excel. The whole operation takes 30 seconds and requires no scripting.

Preparing bulk import for CRM systems

Salesforce, HubSpot, Zoho CRM, and most other CRM systems accept CSV files for bulk contact or lead import. If your marketing data is in JSON format (from a form submission system, a web scrape, or a marketing automation tool), convert it to CSV using the tool, then upload the CSV file to your CRM's import wizard.

Creating email marketing import files

Mailchimp, Klaviyo, SendGrid, and similar email platforms accept CSV contact lists. Your subscriber data may be in JSON format from a website database export or API. The converter produces CSV files that can be immediately imported, with column headers that map to standard contact fields (first_name, last_name, email, etc.).

Reporting and analytics

Analytics platforms and business intelligence tools (Tableau, Power BI, Looker) can connect directly to CSV files or databases. If you need to produce a CSV report from an API response, the converter provides the simplest path from JSON to a format these tools accept.

Data archiving for compliance

Some compliance and audit requirements specify that data must be stored in open, non-proprietary formats. CSV is the most universally readable format for tabular data. Archiving JSON API responses as CSV ensures long-term readability without proprietary software dependency.

Command-Line Alternatives for Large JSON Files

For large JSON files or automated pipelines, command-line tools handle JSON-to-CSV more efficiently than browser-based tools:

# Using jq + awk (works on any Unix/macOS system)
cat data.json | jq -r '(.[0] | keys_unsorted) as $keys |
  $keys, (.[] | [.[$keys[]]] | @csv)' | awk 'NR==1{print; next} {print}' > output.csv

# Using Python (most reliable for complex JSON)
python3 << 'EOF'
import json, csv, sys

with open('data.json') as f:
    data = json.load(f)

if data:
    with open('output.csv', 'w', newline='') as f:
        writer = csv.DictWriter(f, fieldnames=data[0].keys())
        writer.writeheader()
        writer.writerows(data)
    print(f"Exported {len(data)} rows to output.csv")
EOF

# Using Node.js
node -e "
const fs = require('fs');
const data = JSON.parse(fs.readFileSync('data.json'));
const keys = Object.keys(data[0]);
const csv = [keys.join(','), ...data.map(obj =>
  keys.map(k => JSON.stringify(obj[k] ?? '')).join(',')
)].join('
');
fs.writeFileSync('output.csv', csv);
"

Frequently Asked Questions

Is my JSON uploaded to a server?

No. Conversion runs entirely in your browser using JavaScript. Your JSON data never leaves your device.

What if my JSON objects have different keys?

The header row is generated from the keys of the first object in the array. Objects with additional keys beyond the first object's keys will have those extra values dropped. Objects with missing keys will have empty cells for the missing columns. For consistent output, ensure all objects share the same keys — or pre-process the array to add missing keys with null values before converting.

How are arrays within JSON objects handled?

Nested arrays are serialized as JSON strings in a single CSV cell. If you need array items in separate columns (e.g., tag1, tag2, tag3), flatten the array before conversion — manually reformat the JSON so each array item has its own key.

Can I convert a single JSON object (not an array) to CSV?

Not directly — CSV requires rows of data, and a single object has only one row. Wrap the object in an array first: [yourObject]. The result will be a CSV with one header row and one data row.

Does the converter handle special characters in values?

Yes. Values containing commas, double quotes, or newlines are automatically wrapped in double quotes and internal double quotes are escaped by doubling them — following RFC 4180. The output CSV is safe to open in Excel, Google Sheets, and any standard CSV parser.

Convert JSON to CSV Free Online

Instant spreadsheet-ready rows from any JSON array. No uploads, no account, runs entirely in your browser.

Open JSON to CSV Converter