JSON to CSV

Convert a JSON array of objects into CSV you can open in Excel or Sheets. Free, in your browser.

Flattens an array of JSON objects into CSV, in your browser.

Free to use — premium coming soon

FREE
  • Auto columns
  • Copy & download
  • 100% private
PREMIUM
  • Remove ads
  • Custom delimiters & nested flattening

About the JSON to CSV

JSON to CSV turns an array of objects into a flat table you can open in a spreadsheet. Each object in the array becomes one row, and each unique key across those objects becomes a column header. It is the conversion you reach for when data arrives in JSON form, from a REST API response, a MongoDB or Firestore export, a web-scraping run, or a log file, but the person who needs it lives in Excel, Google Sheets, Tableau, or Power BI. CSV is the universal import format for spreadsheets and databases, so converting first removes the friction between machine-readable JSON and human-readable rows and columns.

Use it whenever you need to read, sort, filter, or pivot JSON without writing code. Analysts paste an API payload to explore it in a pivot table; developers dump a query result to share with a non-technical colleague; teams stage scraped records before a bulk import into a relational database. The tool expects an array at the top level (a list of records); a single object is treated as one row. Because the structure is fixed at two dimensions, JSON to CSV is best for tabular, list-shaped data rather than deeply branching documents where a tree better fits the meaning.

Conversion works by scanning every object to build the full set of column headers, then writing one line per record with values placed under matching headers. Missing keys become empty cells, which keeps rows aligned. Nested objects are flattened into dotted columns, so {"address":{"city":"Tokyo"}} becomes a single column named address.city. Arrays of primitives such as tags are joined into one delimited cell, while arrays of objects (line items, transactions) may be expanded into extra columns. Any value containing a comma, double quote, or line break is wrapped in double quotes, and embedded quotes are doubled, following the RFC 4180 convention spreadsheets expect.

This converter runs entirely in your browser. Your JSON is parsed and serialized locally with no upload to a server, so confidential exports, customer records, or internal API data never leave your machine, which also makes large pastes fast. Accuracy note: CSV has no data types, so everything becomes text once written. Values like ZIP codes, phone numbers, and long IDs keep their digits in the file itself, but Excel may strip leading zeros or show big numbers in scientific notation when it auto-detects types on open. The fix is to import rather than double-click, and set those columns to Text.

Frequently asked questions

What JSON structure does the converter expect?

An array of objects, where each object is one record, for example [{"name":"Ada","age":36},{"name":"Linus","age":40}]. A single object is treated as one row. The union of all keys across the objects becomes the column headers, and records that are missing a key get an empty cell.

How are nested objects and arrays handled?

Nested objects are flattened into dotted column names, so a key like address.city is created from {"address":{"city":"Tokyo"}}. Arrays of simple values (such as tags) are joined into one delimited cell, since CSV is strictly two-dimensional and cannot represent a tree directly.

Why do my leading zeros or long numbers break in Excel?

The CSV file keeps the original characters, but Excel auto-detects types when you open the file, stripping leading zeros from ZIP and phone fields and switching numbers over 15 digits to scientific notation. Use Data > From Text/CSV and set those columns to Text format instead of double-clicking the file.

How are commas and quotes inside my values handled?

Any field that contains a comma, a double quote, or a line break is wrapped in double quotes, and any double quote inside the value is escaped by doubling it (""). This follows the RFC 4180 rules that spreadsheet and database importers expect, so your data stays in the correct columns.

Is my data uploaded anywhere?

No. The conversion happens entirely in your browser using local parsing, so your JSON is never sent to a server. That keeps private exports and API responses on your own machine and makes converting large inputs quick.

From our blog

JSON to XML: When You Still Need XML and How the Mapping Works

By the Super Simple Digital Tools Team · Updated June 2026

JSON won the web. It is lighter, easier to read, and native to JavaScript, so almost every modern REST API speaks it by default. Yet XML never went away, and a working developer still bumps into it constantly. SOAP web services are built on XML envelopes, and large swaths of finance, healthcare, telecom, and government infrastructure run on SOAP. RSS and Atom feeds, podcast feeds, and XML sitemaps are XML by specification, an RSS document must conform to the XML 1.0 standard. Build tools like Maven, configuration for Spring and many Java frameworks, and the Office Open XML behind .docx and .xlsx files are all XML too. If your data starts as JSON but has to travel into one of these systems, you need a clean conversion rather than a rewrite.

Conceptually the two formats agree: both describe a hierarchical tree of named values. The differences are in syntax and in a handful of features each format has that the other lacks. JSON gives you typed values, strings, numbers, booleans, null, plus arrays and objects. XML gives you elements, attributes, namespaces, comments, and processing instructions, but it treats every value as text. A faithful converter has to bridge that gap, and most of the friction in JSON to XML comes from the things XML has that JSON does not, attributes and namespaces, and the things JSON has that XML does not, real arrays and real data types.

The core mapping is simple to picture. The whole document gets a single root element, because XML allows exactly one root while JSON can start with an object or an array. Each object key becomes an element name and its value becomes the element body. Nested objects become nested elements, so {"order":{"id":5}} turns into an order element containing an id element. Arrays expand into repeated sibling elements with the same tag, the only sensible way to express a list in XML. Scalar values are written as the text content of their element, and because the type information is gone, a consumer reading the XML back has to know from context or from a schema that a given field is a number rather than a string.

A few details trip people up. XML reserves &, <, and > for its own markup, so any of those characters appearing inside a JSON value must be escaped to &amp;, &lt;, and &gt; or the output will not parse. Element names are also constrained: they cannot begin with a digit and cannot contain spaces or most punctuation, so a JSON key like "2024-total" or "line items" has to be sanitised, commonly by prefixing an underscore for leading digits and replacing spaces with underscores. Empty objects, deeply nested arrays, and keys that differ only by case are other corners worth checking. Because of all this, JSON and XML are not a perfect round trip, converting JSON to XML and back can subtly change types or names.

The safe workflow is to convert, then verify. Generate the XML, eyeball the structure, and if you have a target schema, validate the output against the XSD or DTD that the receiving system publishes. If the target expects certain values as attributes rather than child elements, restructure your JSON first using an attribute convention the converter understands, rather than hand-editing the XML afterward. For SOAP, wrap the converted body in the correct envelope and namespaces the service requires. Treat the converter as a fast first draft of the document shape, and let your schema, not your eyes, be the final judge of correctness.

  • Wrap your JSON in a single top-level object before converting; XML needs exactly one root element, so a bare top-level array will be wrapped automatically and the tag name may not be what you expect.
  • Remember that arrays become repeated sibling elements, not a wrapper plus children, so use a singular, descriptive key name for array items to keep the XML readable.
  • If the receiving schema requires data types, add type attributes (for example type="number") yourself, because XML loses JSON's number, boolean, and null distinctions in plain conversion.
  • Rename any JSON keys that start with a digit or contain spaces before converting, so the element names are predictable instead of being silently underscored by the sanitiser.

Read the full guide →

Tool by the Super Simple Digital Tools Team. Reviewed by our editorial team. Free to use, no signup required.

Related tools