convert-csv.com logo convert-csv.com

Convert JSON to CSV / Excel

Convert JSON (including nested objects and arrays) to flat CSV or Excel. Flattening keys are fully configurable.

100% Secure - your files are processed in your browser and never sent to a server.
Drop your file hereor click to browseSupports JSON or TXT files (.json, .txt) (Max 100MB)

**JSON to CSV conversion** is the process of transforming JavaScript Object Notation data into Comma-Separated Values, a flat tabular format defined by RFC 4180. JSON (ECMA-404) is the dominant data interchange format for web APIs and modern applications, but many tools, databases, and spreadsheet applications work best with flat, tabular data. Converting JSON to CSV requires flattening hierarchical objects into rows and columns, which is challenging when dealing with nested arrays, deeply nested objects, and inconsistent schemas. This converter uses dot-notation to flatten nested JSON structures, turning keys like "user.address.city" into individual CSV columns. It handles arrays of objects (the most common API response format), nested objects, and mixed data types. You can toggle automatic type inference, which converts numeric strings to numbers and "true"/"false" strings to booleans in the output. The parser uses PapaParse under the hood, which is RFC 4180 compliant and handles edge cases like quoted fields, escaped commas, and multi-line values correctly. All processing runs in a Web Worker thread in your browser, keeping the interface responsive even with large JSON payloads.

How to use the Convert JSON to CSV tool

  1. Load your JSON data: Drag and drop your .json file, choose a file from your file explorer, or paste JSON directly into the paste area.
  2. Configure output settings: Choose a CSV delimiter (comma, semicolon, tab, or pipe) and toggle whether to include a header row.
  3. Convert to CSV: Click the "Convert Data" button to flatten nested JSON objects into CSV columns using dot-notation keys.
  4. Export results: Copy the results to your clipboard, download as a local file, or export to Excel format.

Frequently asked questions

How does the tool flatten nested JSON objects into CSV columns?
The converter uses dot-notation to flatten nested structures. For example, {"user": {"name": "Alice"}} becomes a column "user.name" with value "Alice". This works for any depth of nesting. The dot-notation approach follows the JSON Pointer specification (RFC 6901) for navigating hierarchical JSON structures.
Does it handle JSON arrays as well as objects?
Yes. The tool accepts both arrays of objects (the most common format from REST APIs) and single objects. Arrays of objects are converted to rows, with each object becoming one CSV row. The JSON structure follows the ECMA-404 specification, which defines the standard format for JSON data interchange.
What is automatic type inference?
When enabled, the parser converts numeric strings to numbers and "true"/"false" strings to booleans in the CSV output. When disabled, all values are preserved as text strings. The type inference follows JavaScript's native type coercion rules as defined in the ECMAScript specification.
Can I use this to convert API responses to CSV?
Yes. Paste any JSON array of objects (the standard format returned by REST APIs) and the tool will flatten it into CSV with one column per unique key path. REST APIs typically return JSON in the format specified by the OpenAPI/Swagger specification.
How are null and undefined values handled?
Null values are output as empty strings in the CSV. Undefined or missing keys in objects produce empty cells in the corresponding columns. This follows the convention for representing missing data in CSV format as described in the W3C CSV on the Web specification.

Related tools