🛠 Developer Tools Runs In-Browser No Sign-up Large File Ready

JSON to CSV Converter

Paste, upload, drag & drop, or import JSON from a URL and get a clean, downloadable CSV instantly — with a tree view, spreadsheet-style CSV preview, live validation, nested-object flattening, column mapping, and TSV/Excel-compatible export. Nothing ever leaves your browser.

🔒 No server storage ⚡ Instant conversion 📦 Large file support 🆓 Free forever

Convert JSON to CSV

Paste JSON, upload a file, drag & drop, or import from a URL — output updates live for smaller files.

JSON Input

Empty Paste, upload, or import JSON to begin.
Characters0
Objects
Arrays
Max Depth
CSV Rows
CSV Columns
File Size
Output Size
Duplicate Rows
Conversion Time
⚙️ Conversion Settings
🌳 JSON Tree View

CSV Output

📊 Spreadsheet Preview

📄 Raw CSV


                
🕘 History (undo/redo & recent conversions)
    📦 Batch Conversion (multiple files → ZIP)

      Why Developers Choose ToolAdda's JSON to CSV Converter

      🔒 100% private

      Parsing runs entirely in JavaScript in your browser. Your JSON, however sensitive, never leaves your device.

      🌳 Real tree view

      Explore your JSON input's structure in a collapsible tree before you commit to converting.

      📊 Spreadsheet preview

      See exactly what your CSV will look like in a real table, not just a wall of text.

      🧩 Nested object flattening

      Dot-notation columns like address.city are generated automatically — no manual mapping required.

      🗂️ Column mapping

      Rename or ignore any column with live-updating output — no post-processing script required.

      📗 Excel-ready export

      Download a UTF-8 BOM-prefixed CSV that Excel decodes correctly, plus native TSV export.

      📦 Batch + ZIP

      Convert many JSON files at once and download every CSV result in a single ZIP archive.

      ↶ Undo/redo history

      Every conversion is checkpointed — jump back to any previous input and output instantly.

      ♿ Fully accessible

      Semantic markup, ARIA live regions, keyboard-navigable tree, and full color-contrast compliance.

      What Is JSON, What Is CSV, and How Conversion Works

      What Is JSON?

      JSON (JavaScript Object Notation) is a lightweight, text-based data format built from two structures — objects (key-value pairs in curly braces) and arrays (ordered lists in square brackets) — plus primitive types: strings, numbers, booleans, and null. Because it maps directly onto the object and array types every modern programming language already has, JSON is the default format for REST APIs, mobile app payloads, NoSQL databases, and frontend state management. Critically, JSON can nest arbitrarily deep, which is exactly the structure this converter has to unpack into CSV's inherently flat rows and columns.

      What Is CSV?

      CSV (Comma-Separated Values) is a plain-text format for tabular data: each line is a row, and values within a row are separated by a delimiter — usually a comma. The first row conventionally holds column headers, and every spreadsheet application (Excel, Google Sheets, Numbers), database, and BI tool can import CSV without any special integration, which is exactly why it remains the universal format for moving data into tabular and reporting tools.

      JSON vs CSV: Key Differences

      JSON is hierarchical and typed: values can be strings, numbers, booleans, null, nested objects, or arrays of any of those. CSV is flat by design: every value lives in a single row/column cell, with no native concept of nesting or explicit types — everything is just text. Converting JSON to CSV means making explicit decisions JSON never had to: how to represent nested objects as flat columns, how to represent arrays inside a single cell, and what column order the flattened data should use.

      Advantages of CSV

      • Universally supported by every spreadsheet application and BI tool without any coding.
      • Extremely compact for large, uniform tabular datasets — no repeated key names per row like JSON has.
      • Human-editable in a plain text editor or spreadsheet without needing to understand JSON syntax.
      • The standard import format for CRMs, accounting software, and most database bulk-load tools.

      Advantages of JSON

      • Native nesting and arrays — no flattening tricks required to represent related, hierarchical data.
      • Explicit types (numbers, booleans, null) instead of everything being an untyped string.
      • Native parsing in every modern language (JSON.parse in JavaScript, json.loads in Python) with zero extra libraries.
      • The de facto standard for REST APIs, GraphQL responses, and mobile app payloads.

      How JSON to CSV Conversion Works

      This converter first parses your JSON text, then normalizes it into a list of flat records: an array of objects becomes one record per object, a single object becomes one record, and an array of arrays becomes position-based records. With Flatten Nested Objects enabled, each record is recursively walked so nested keys become dot-notation column names before the column list and CSV rows are built — all synchronously in your browser using plain JavaScript, with no server round-trip.

      Objects: The Basic Building Block

      A JSON object's keys become CSV column headers, and its values become the cells of one CSV row. When you convert an array containing many objects, this converter takes the union of every object's keys — in the order they first appear, or alphabetically if you choose that Column Order setting — so objects with slightly different fields still produce one consistent, complete CSV table instead of silently dropping columns.

      Arrays: Array of Objects vs Array of Arrays

      The most common shape — an array of objects — converts naturally: one row per object. A less common but still-supported shape, an array of arrays (each inner array representing one row of positional values), is detected automatically and converted using generic column_1, column_2 headers, since there are no key names to draw from.

      Flattening Nested Objects

      Real-world JSON is rarely flat — an address field might itself be an object with city, state, and zip. With Flatten Nested Objects enabled, this converter recursively expands such nested objects into dot-notation columns (address.city, address.state, address.zip), so no structure is lost and every value still lands in its own column. Disable this setting if you'd rather keep nested values as raw, single-cell JSON text instead.

      Headers and Column Naming

      By default, CSV column headers are the JSON keys exactly as written (or the dot-notation path for flattened nested keys). If your API or downstream tool expects different field names, use the Column Mapping panel after converting to rename any column without touching your source JSON or writing a transform script.

      Data Types in CSV Output

      CSV has no type system, so every JSON value is written to its CSV cell as plain text: numbers keep their exact original text representation (so large integers and precise decimals aren't silently re-rounded), booleans become the literal words true/false, and null becomes an empty cell by default — configurable to any placeholder text you choose in Null Replacement.

      API Responses & REST APIs

      Most REST APIs return JSON, but the business teams consuming that data — sales, finance, operations — usually work in spreadsheets, not JSON viewers. Pasting a real API response here, tuning Flatten and Column Mapping until the CSV shape makes sense for a spreadsheet, and downloading it is often the fastest way to hand off API data to a non-technical teammate without writing a one-off export script.

      Frontend Development

      Frontend teams sometimes need to offer a "download as CSV" feature for tabular data that's fetched or generated as JSON in the browser — an admin dashboard's user list, a report builder's results. Prototyping and validating the exact CSV shape here, including column order and nested-field flattening, is faster than iterating on that export logic directly inside application code.

      Backend Development & Database Export

      Backend systems frequently need to export JSON documents (from a MongoDB collection, a Firestore export, or an internal API) into CSV for a data warehouse load, a client deliverable, or a legacy system that only accepts tabular input. Converting here first lets you confirm the exact column set and flattening behavior before replicating the same logic in a script or ETL job.

      Spreadsheet Export & Excel Compatibility

      Plain UTF-8 CSV files can be misread by Microsoft Excel when they contain accented letters, currency symbols, or non-Latin scripts, because Excel doesn't always assume UTF-8 by default on every platform. The Excel-Compatible CSV download here prepends a UTF-8 byte-order mark (BOM) — three specific invisible bytes at the start of the file — which signals to Excel exactly which encoding to use, so special characters display correctly instead of turning into garbled symbols.

      Data Migration

      Migrating data between systems often means exporting JSON from one platform's API and importing CSV into another (many legacy systems, CRMs, and import wizards only accept CSV). This tool's column mapping and flattening settings let you shape the JSON export to match the destination system's expected column names and structure in one pass, rather than hand-editing the file afterward.

      Analytics, Reporting & Business Intelligence

      BI tools like Excel, Google Sheets, Tableau, and Power BI are built around tabular data, not nested JSON. Converting a JSON export from an analytics API or event log into a flat CSV — with dates reformatted and empty columns removed — makes that data immediately usable in a pivot table or dashboard without a separate ETL step.

      Common JSON Errors and Validation Tips

      • Trailing commas — a comma after the last item in an object or array is invalid in standard JSON, unlike JavaScript object literals.
      • Single quotes instead of double quotes — JSON strings and keys must use double quotes; single quotes will fail to parse.
      • Unquoted keys — every JSON object key must be a double-quoted string, unlike relaxed JavaScript object syntax.
      • Mismatched brackets/braces — every {/[ needs a matching, correctly nested }/].
      • Comments — standard JSON has no comment syntax; // or /* */ will cause a parse error.

      This converter validates JSON before every conversion attempt and surfaces the parser's exact error message plus an approximate line and column number, so you can jump straight to the problem instead of scanning the whole file by eye.

      Duplicate Rows and Data Quality

      An exact duplicate row — every column identical to an earlier row — often signals a bug in whatever generated the JSON (a repeated array entry, a faulty join, a retried API call that got recorded twice). This converter flags duplicate rows after conversion so you can decide whether to de-duplicate at the source before importing the CSV downstream.

      Best Practices for JSON to CSV Conversion

      1. Review the tree view first for JSON you haven't seen the shape of before, so you know what flattening will actually produce.
      2. Use Column Mapping to rename headers to match your spreadsheet's or database's expected field names instead of post-processing the CSV afterward.
      3. Enable Ignore Empty Fields for sparse, optional-heavy JSON to avoid a CSV cluttered with entirely blank columns.
      4. Choose Excel-Compatible CSV whenever your data contains accented characters or non-English text and the recipient will open it in Microsoft Excel.
      5. For recurring exports, use Batch Conversion so every file in a run is processed with identical settings.

      Privacy & Security

      Every step here — parsing, validation, flattening, tree rendering, CSV generation — runs entirely inside your browser's JavaScript engine. No JSON or CSV you work with is ever transmitted to ToolAdda's servers or any third party; the only exception is the optional Import from URL feature, which fetches directly from the URL you provide, from your own browser. This makes the tool safe to use even with sensitive exports — customer records, financial data, internal API responses — since nothing is uploaded anywhere at any point in the process.

      Why Choose ToolAdda's JSON to CSV Converter

      Most free JSON to CSV tools stop at a single "convert" button with no visibility into how nested data was handled or what the resulting columns look like. This one adds a real JSON tree view, a live spreadsheet-style CSV preview, transparent and configurable nested-object flattening, column rename/ignore mapping, empty-column removal, null and date formatting, duplicate-row detection, TSV and Excel-compatible export, batch-to-ZIP conversion, and full undo/redo history — while remaining entirely private, free, and fast enough for large files.

      Developer Tips

      • When exporting API responses for a non-technical teammate, enable Flatten Nested Objects and rename columns to plain-English labels in Column Mapping before sharing the CSV.
      • If a nested array contains objects with different shapes, check the tree view first — flattening indexed array items (tags.0, tags.1) works best when array items are structurally similar.
      • For a spreadsheet destined for a non-English-speaking team using Excel, always choose Excel-Compatible CSV to avoid encoding issues with accented characters.
      • Use Alphabetical column order when you need a predictable, diff-friendly CSV across repeated exports of similarly-shaped data.

      Using the Converted CSV in Your Code

      This page is a browser tool, not a hosted API — everything runs client-side, so there's no endpoint to call. If you want to replicate the same conversion in your own backend or scripts, here's the equivalent logic in a few common stacks.

      // Node.js — convert an array of JSON objects to CSV with json2csv
      const { Parser } = require("json2csv");
      const fs = require("fs");
      
      const data = JSON.parse(fs.readFileSync("data.json", "utf8"));
      const parser = new Parser();
      const csv = parser.parse(data);
      
      fs.writeFileSync("output.csv", csv);
      # Python — convert JSON to CSV with pandas
      import pandas as pd
      
      df = pd.read_json("data.json")
      df.to_csv("output.csv", index=False)
      // Fetch JSON from your own API before converting
      const response = await fetch("https://api.example.com/records");
      if (!response.ok) throw new Error(`Fetch failed: ${response.status}`);
      const data = await response.json();
      
      // Paste the resulting JSON into this page's editor,
      // or feed it into the same conversion logic shown above.
      console.log(JSON.stringify(data, null, 2));

      Frequently Asked Questions

      What is a JSON to CSV converter?

      A JSON to CSV converter transforms JSON objects or arrays into rows and columns of comma-separated values, typically using one JSON object's keys as the CSV header and each object as one CSV row.

      Is this JSON to CSV converter free?

      Yes. ToolAdda's JSON to CSV converter is completely free, has no usage limits, and requires no account or sign-up.

      Is my JSON data uploaded to a server?

      No. Parsing and conversion happen locally in your browser using JavaScript. Nothing you paste, upload, or import is ever sent to ToolAdda's servers — the only exception is the optional Import from URL feature, which fetches directly from the URL you provide, from your own browser.

      Can it convert nested JSON objects?

      Yes. Enable Flatten Nested Objects and a nested value like address: { city, zip } becomes two flat columns, address.city and address.zip, in the CSV output.

      How does Flatten Nested Objects work?

      It recursively walks each object, turning nested keys into dot-notation column names. Nested arrays of simple values are joined with a semicolon into one cell; nested arrays of objects get index-based columns like tags.0, tags.1. Disable it to keep nested values as raw JSON text inside a single cell instead.

      Can it convert an array of objects, a single object, or an array of arrays?

      Yes to all three. An array of objects becomes one CSV row per object; a single object becomes one CSV row; an array of arrays becomes rows with generic column_1, column_2, etc. headers.

      Does the converter handle arrays inside objects?

      Yes. With Flatten enabled, an array of plain values (like tags: ["a","b"]) is joined into a single semicolon-separated cell; an array of objects is expanded into indexed columns so no data is lost.

      Can I choose a custom delimiter?

      Yes. Choose comma, semicolon, tab, pipe, or Custom and enter any single character in Settings.

      Can I generate a TSV file instead of CSV?

      Yes. Click Download TSV to get a tab-separated version of your data regardless of the delimiter currently selected in Settings.

      What is Excel-compatible CSV, and why would I need it?

      Microsoft Excel sometimes misreads plain UTF-8 CSV files containing accented or non-Latin characters. Download Excel-Compatible CSV to get the same CSV with a UTF-8 byte-order mark (BOM) prepended, which tells Excel to decode it correctly.

      Can I rename or ignore specific columns?

      Yes. After converting, the Column Mapping panel lists every detected column with a rename field and an Ignore checkbox — changes apply instantly to the CSV output and preview table.

      Can I control column order?

      Yes. Choose First-seen order to keep columns in the order keys first appear in your JSON, or Alphabetical to sort column headers A–Z.

      Can I remove columns that are empty across every row?

      Yes. Enable Ignore Empty Fields to automatically drop any column that is blank, null, or missing in every single row, keeping your CSV free of useless empty columns.

      How are null values handled?

      By default, JSON null becomes an empty CSV cell. Set a custom value in Null Replacement (like "N/A") in Settings if you want nulls to appear as explicit text instead.

      Does the converter format date strings?

      Yes, optionally. Set Date Formatting to Date only or Locale format to reformat ISO 8601 date/datetime strings found in your JSON; leave it on None to keep dates exactly as written.

      Does the converter validate my JSON before converting?

      Yes. Every conversion attempt parses the JSON first. If it's invalid, the validation panel shows the exact error message along with the line and column number where the problem starts.

      What happens if my JSON has a syntax error?

      The validation panel switches to Invalid and displays the parser's error message plus an approximate line and column number, so you can jump straight to the problem instead of scanning the whole file.

      Does it detect duplicate rows?

      Yes. After conversion, any row that is an exact duplicate of an earlier row (identical values in every column) is counted and flagged in the statistics dashboard.

      Can I upload a large JSON file?

      Yes. Larger inputs defer conversion by a frame with a visible progress indicator so the page stays responsive, and the CSV table preview only renders the first 50 rows so the browser tab never freezes on huge files.

      Does this tool detect file encoding automatically?

      Yes. When you upload a file, the converter inspects the byte-order mark (BOM) to correctly decode UTF-8, UTF-16LE, and UTF-16BE before conversion.

      Can I import JSON directly from a URL?

      Yes. Paste a public URL — like a REST API endpoint — into the Import from URL field. The request is made directly from your browser, so the target server must allow cross-origin (CORS) requests for the fetch to succeed.

      Can I convert multiple JSON files at once?

      Yes. Use the batch conversion panel to select multiple .json files; each is converted with your current settings and you can download all the resulting CSV files together as a single ZIP archive.

      Does the tool have undo and redo?

      Yes. Every successful conversion is saved to a short history. Use Undo and Redo, or click any entry in the History panel, to jump back to a previous JSON input and its converted output instantly.

      How are quotes and special characters escaped in the CSV output?

      Any cell containing the delimiter, a quote character, or a line break is automatically wrapped in quotes, and quote characters inside the value are escaped by doubling them (the RFC 4180 standard) or with a backslash, depending on your Escape Style setting.

      Can I copy the CSV output directly?

      Yes. Click Copy CSV to copy the full converted output to your clipboard, ready to paste into a spreadsheet or another tool.

      Can I convert CSV back to JSON?

      Yes, use ToolAdda's separate CSV to JSON Converter to reverse the process.

      Does this work on mobile devices?

      Yes. The editor, tree view, table preview, and all controls are fully responsive and touch-friendly, and every feature works the same on mobile browsers as on desktop.

      Will numbers or IDs lose precision or formatting in the CSV?

      No. This converter writes every JSON value's text representation directly to the CSV cell rather than re-parsing it as a number, so large integers, decimals, and string-typed IDs with leading zeros are preserved exactly as they appear in your JSON.

      Ready to Convert Your JSON?

      Paste, upload, or import your JSON and get a clean, spreadsheet-ready CSV in seconds — free, private, and built for real developer workflows.

      ⚡ Convert JSON to CSV Now
      JSON → CSV