JSON to CSV Converter

Convert JSON arrays and objects to RFC 4180-compliant CSV. Flatten nested keys, choose delimiter, preview the table, and download — entirely client-side.

Loading JSON to CSV Converter…

What is JSON?

JSON (JavaScript Object Notation) is a lightweight, human-readable data interchange format. It stores data as key-value pairs, supports nesting through objects and arrays, and is the de-facto standard for REST APIs, configuration files, and NoSQL databases (MongoDB, DynamoDB, Firestore). JSON handles six primitive types: string, number, boolean, null, object, and array — making it expressive enough to represent almost any real-world data structure.

What is CSV?

CSV (Comma-Separated Values) is a plain-text tabular format where each line represents a row and each field is separated by a delimiter (typically a comma). Defined by RFC 4180, CSV is the universal language of spreadsheets — supported natively by Microsoft Excel, Google Sheets, LibreOffice Calc, Tableau, Power BI, and virtually every data analysis tool. Its simplicity makes it ideal for data export, bulk imports, and ETL pipelines.

JSON vs CSV — Key Differences

FeatureJSONCSV
StructureHierarchical — objects, arrays, nestingFlat — rows and columns only
Data TypesString, Number, Boolean, Null, Object, ArrayEverything is plain text
NestingUnlimited nesting depthNo native nesting support
ReadabilityHuman-readable for developersHuman-readable for analysts
Spreadsheet SupportNot natively supported (needs parsing)Opens directly in Excel / Sheets
File SizeLarger due to key repetitionCompact — keys appear only in header
Best ForAPIs, NoSQL databases, configsAnalytics, BI tools, data pipelines

When Should You Convert JSON to CSV?

  • Sharing data with non-technical stakeholders: Business analysts, product managers, and executives work in spreadsheets. CSV lets them open API data directly in Excel without any development overhead.
  • Feeding data pipelines and ETL processes: Tools like Apache Spark, dbt, AWS Glue, and Airbyte commonly accept CSV as a universal ingestion format from REST API sources.
  • Importing into relational databases: COPY commands in PostgreSQL, LOAD DATA INFILE in MySQL, and bulk import utilities in SQL Server all accept CSV natively.
  • Business Intelligence and Analytics: Tableau, Power BI, Looker, and Google Data Studio can read CSV files directly to build visualizations without requiring a database connection.
  • Archiving and auditing JSON API responses: Storing API snapshots as CSV reduces file size and makes records auditable in any spreadsheet application.

How Nested JSON is Flattened

JSON's hierarchical nature doesn't map directly to CSV's flat table structure. ToolZeno's flattening engine recursively traverses nested objects and generates column headers using a configurable separator character:

Input JSON

{
  "id": 1,
  "name": "Alice",
  "address": {
    "city": "San Francisco",
    "state": "CA"
  },
  "score": 98.5
}

Flattened CSV Output (separator: ".")

id,name,address.city,address.state,score
1,Alice,San Francisco,CA,98.5

You can switch the separator to _ to get address_city, or use any custom string. Arrays inside objects are serialised as JSON strings to preserve their data without expanding into unbounded columns.

Complete JSON to CSV Conversion Example

Input JSON (API Response)

[
  {
    "id": 1,
    "product": "Keyboard",
    "price": 79.99,
    "stock": {
      "warehouse": "NYC",
      "quantity": 250
    },
    "available": true
  },
  {
    "id": 2,
    "product": "Mouse",
    "price": 49.99,
    "stock": {
      "warehouse": "LAX",
      "quantity": 180
    },
    "available": false
  }
]

Output CSV (Flattened, Comma Delimiter)

id,product,price,stock.warehouse,stock.quantity,available
1,Keyboard,79.99,NYC,250,true
2,Mouse,49.99,LAX,180,false

Key Features of ToolZeno's JSON to CSV Converter

🔒 100% Client-Side Privacy

Your JSON never leaves your browser. Zero server uploads.

🗂️ Nested Object Flattening

Recursively flattens deeply nested objects with a configurable separator.

📋 Multiple Delimiters

Choose comma, semicolon, pipe, or tab to match your target application.

👁️ Interactive Table Preview

Inspect the output in a responsive sticky-header table with row filtering.

📥 Download CSV or TXT

Download the output as .csv or .txt with one click.

🔄 Auto-Reconvert on Options Change

Output updates instantly when you change any option.

⚡ Virtual Scrolling

Renders large datasets (200+ rows) efficiently without freezing the browser.

🌐 Full Unicode Support

Handles emoji, accented characters, CJK, Arabic, and all Unicode ranges.

✅ Real-time JSON Validation

Highlights syntax errors with exact line and column numbers.

🎨 Dark & Light Mode

Adapts to your system theme or manual preference.

How to Use the JSON to CSV Converter

  1. 1Paste or upload your JSON: Type or paste JSON directly into the editor on the left, or click the upload icon to drag-and-drop a .json file. You can also load a realistic sample using the "Load Sample" sparkle button.
  2. 2Configure conversion options: Choose your column delimiter (comma is the default), enable nested flattening, adjust the key separator, select a quote strategy, and toggle the header row — all from the options bar above the editor.
  3. 3Click Convert: Press the "Convert JSON to CSV" button. The output appears in the right panel as both raw CSV text and a formatted table preview. The tool automatically switches to the Table Preview tab after conversion.
  4. 4Review and filter: Use the Table Preview tab to inspect rows and filter data by keyword. Statistics below the editor show row count, column count, file sizes, and conversion duration.
  5. 5Download or copy: Click the Copy button to send the CSV to your clipboard, or use the Download button to save it as a .csv file. A secondary download option produces a .txt file.

Related Data Conversion Tools

Frequently Asked Questions

Absolutely. ToolZeno's JSON to CSV Converter runs 100% client-side inside your web browser. Your JSON data is never sent to any server, stored online, or logged anywhere. All parsing, flattening, and CSV generation happen entirely in your device's memory using JavaScript — fully air-gapped from any backend.

When the "Flatten nested" option is enabled, nested objects are recursively expanded into dot-separated column names. For example, { "address": { "city": "NYC", "zip": "10001" } } produces two columns: address.city and address.zip. You can customise the separator to use underscores, hyphens, or any string you prefer.

Arrays that appear as values inside JSON objects (e.g. "tags": ["react","typescript"]) are serialised as a JSON string in a single cell — e.g. ["react","typescript"]. This preserves all data without losing information. Root-level JSON arrays are treated as separate rows.

ToolZeno supports four standard delimiters: Comma (,) — the default CSV standard; Semicolon (;) — common in European locales where comma is used as decimal separator; Pipe (|) — useful when data contains commas and semicolons; Tab (\t) — produces TSV (Tab-Separated Values) compatible with most spreadsheet applications.

Yes. The converter accepts files up to 10 MB via drag-and-drop or file upload. For very large datasets (200+ rows), the Table Preview activates virtual scrolling — only the visible rows are rendered in the DOM, keeping the browser fast and responsive even with thousands of rows.

Yes. By default, ToolZeno uses CRLF (\r\n) line endings and RFC 4180-compliant quoting — both required by Excel. If your data contains commas inside values, the Minimal quote strategy will automatically wrap those cells in double-quotes. For European Excel installs that expect semicolons, simply switch the delimiter to ";".

Yes. The converter is fully Unicode-aware. Characters like accented letters (é, ü, ñ), CJK characters (中文, 日本語), Arabic, and even emoji (🚀, ✅) are preserved exactly as-is in the CSV output. Special CSV characters (commas, double-quotes, newlines) are correctly escaped per the RFC 4180 standard.