ToolForge
Advertisement

JSON to CSV Converter

Convert JSON data to CSV format

Written by toolforge.websiteLast reviewed How we build and check these tools

JSON to CSV Converter tool

JSON to CSV Converter: key facts

What it does
Convert JSON data to CSV format
Category
Developer Tools
Cost
Free, with no account, sign-up, or install.
Your data
Runs entirely in your browser — the files and text you enter are never uploaded to a server.
Last reviewed
. Report an incorrect result.
Advertisement

About the JSON to CSV Converter

Spreadsheets speak CSV, APIs speak JSON, and the gap between them is a frequent chore. JSON to CSV converts an array of JSON objects into clean, spreadsheet-ready CSV — collecting every field into columns and lining up the rows.

It is the quick bridge for getting data into Excel, Google Sheets, or a database import: exporting an API result for a non-technical colleague, turning a list of records into a report, or prepping a bulk upload. Nested objects are flattened into dot-notation columns, so {"user":{"name":"Ann"}} becomes a user.name column rather than an unreadable blob.

How to use it

  1. Paste a JSON array of objects (or a single object) into the "JSON Input" box.
  2. The tool collects all keys across your objects to build the CSV header row.
  3. Read the generated CSV; nested object fields appear as dot-notation columns like address.city.
  4. Click Copy to paste into a sheet, or Download to save it as data.csv.

Flattening records into rows

An array of objects maps onto a table naturally: each object becomes a row and each key becomes a column. The tool collects the union of keys across all records to build the header, so an object missing a field produces an empty cell rather than a shifted row.

Values containing a comma, a quote, or a newline are wrapped in double quotes, and any quote inside the value is doubled — which is the escaping rule the CSV convention actually specifies. Getting that wrong is the usual reason a generated CSV opens misaligned in a spreadsheet.

Nested structures are the genuine difficulty, because a table has no way to represent a value that is itself an object or an array. Those are flattened into a single cell, which preserves the information without making it usefully queryable.

  • An array of three flat objects with the same keys converts cleanly to a header row plus three data rows.
  • A value containing a comma is emitted quoted, so the field boundary survives.
  • A value containing a double quote has it doubled inside the quoted field, per the CSV convention.

Why use this version

  • It flattens nested objects into dot-notation columns automatically, so structured records become a flat table without manual reshaping.
  • It gathers the union of all keys across every object, so records with different fields still line up correctly, with blanks where a value is missing.
  • Values containing commas, quotes, or line breaks are quoted and escaped following the standard CSV rules, so the output imports cleanly into Excel and Google Sheets.
  • Conversion runs in your browser and the result downloads as a .csv file directly — no upload, no account.

Why CSV is less standard than it looks

There is no single CSV specification that tools agree on. The separator is a comma in English-speaking locales and frequently a semicolon where the comma is the decimal mark, which is why a file that opens correctly on one machine lands entirely in column A on another. Line endings, quoting behaviour, and whether a header row is expected all vary by producer.

Spreadsheet software also transforms values on import in ways that lose data silently. Long numeric strings become floats in scientific notation, leading zeros are stripped from identifiers and postcodes, and strings that resemble dates are converted — the reason a gene name or a product code can be quietly rewritten. Importing as text rather than double-clicking the file avoids most of it.

Encoding is the other recurring problem: a UTF-8 file without a byte-order mark is frequently interpreted as a legacy encoding, which corrupts every non-ASCII character. Where structure genuinely matters, a format that carries types — Parquet, or JSON itself — is a better destination than CSV.

Frequently Asked Questions

What JSON structure does this expect?

An array of objects works best — each object becomes a row and each key becomes a column. A single object is also accepted and produces a one-row CSV. Deeply nested objects are flattened into dot-notation columns.

How are nested objects handled?

Nested objects are flattened using dot notation, so {"user":{"name":"Ann","age":30}} becomes two columns, user.name and user.age. This keeps the structure visible while fitting into a flat table.

Can I change the delimiter to a semicolon or tab?

This tool outputs standard comma-separated values. If your spreadsheet locale expects a semicolon, most spreadsheet apps let you choose the delimiter on import, or you can find-and-replace after pasting.

What happens to values with commas in them?

They are automatically wrapped in double quotes, and any double quotes inside the value are doubled — the standard CSV escaping. This ensures a value like "Smith, John" stays in a single column when imported.

Related Tools

Advertisement
Buy Me a Coffee