JSON to CSV

Convert JSON arrays, NDJSON and API responses into CSV — nested objects flattened into columns.

Runs in your browser. Files and text you add here are processed on your own device with JavaScript and are not uploaded to our server. Some tools download a free open-source library (for example PDF.js or QPDF) from a public CDN the first time you use them. Very large files depend on your device's memory.

APIs, databases and analytics tools love JSON; managers, accountants and spreadsheets don't. When someone asks for “that data in Excel”, the JSON needs flattening into rows and columns first.

This converter turns a JSON array of objects into CSV in your browser. It collects every key that appears in any record to build the column list, flattens nested objects into dotted columns such as address.city, and writes arrays as JSON text in a single cell. It also accepts NDJSON (one object per line) and responses where the array is wrapped in an object such as {"data": [...]}.

Choose comma, semicolon or tab separation and optionally add a UTF-8 BOM so Excel shows accents and non-Latin text correctly.

Records don't all need the same fields: a key that exists in only some objects still becomes a column, and records without it simply get an empty cell. That is the normal shape of real API data, where optional fields are left out rather than set to null.

The conversion is done locally, which keeps API exports that contain personal or commercial data off third-party servers.

How It Works

  1. Add JSON files — standard JSON, NDJSON/JSON Lines, or a single object that contains an array.
  2. Choose options — delimiter, flattening of nested objects, and the UTF-8 BOM for Excel.
  3. Convert — the tool gathers the union of all keys (in order of first appearance), writes a header row, escapes values that contain delimiters, quotes or line breaks, and saves a .csv per input file.

Compatibility & Support

Supported Input → Output Formats

  • Input: .json, .ndjson, .jsonl, .txt containing JSON
  • Output: .csv (comma, semicolon or tab), UTF-8 with optional BOM
  • Structure: nested objects → dotted columns; arrays → JSON text in one cell

Unsupported Formats

Deeply nested arrays of objects (for example orders each containing line items) can't be turned into a single flat table without choosing which level becomes rows. The tool keeps them as JSON text in a cell so no data is lost; for one-row-per-item output, extract the inner array first.

Invalid JSON is reported with the parser's error message — fix it with the JSON Formatter.

File Size Limits

Up to 20 files per batch and 50 MB each. Files with hundreds of distinct keys produce very wide CSVs; Excel supports up to 16,384 columns.

CSV is usually smaller than the JSON it came from, because key names are written once in the header instead of in every record. A 20 MB API export commonly becomes a 6–10 MB CSV, which is easier to email and faster to open in a spreadsheet.

Who Should Use This Tool?

  • Students: A data-science student converts a JSON dataset from a public API into CSV to explore it in Excel before writing code.
  • Freelancers & Designers: A freelancer exports form submissions from a headless CMS as JSON and converts them to CSV for the client.
  • Office Professionals: A finance officer converts a JSON transaction export from a payment gateway into CSV for reconciliation.
  • Developers: A developer flattens a MongoDB export to CSV so a product manager can filter it in Google Sheets.

Key Features / Khusoosiyat

Here's what separates this tool from generic alternatives:

🧱

Automatic Columns

Every key in any record becomes a column.

🪜

Flatten Nested Objects

address.city-style columns from nested data.

📜

NDJSON Support

Reads JSON Lines as well as normal arrays.

🎁

Wrapped Arrays

Finds the array inside responses like {"data": [...]}.

🌍

Excel-Friendly

Optional UTF-8 BOM and semicolon or tab separators.

🔒

Private

API data is converted in your browser.

Why This Tool Beats the Alternatives

  • Handles records with different keys without dropping fields.
  • Flattens nested objects instead of printing “[object Object]”.
  • Accepts NDJSON and wrapped API responses.
  • No upload of API exports that contain personal data.
  • Free, with batch conversion.

Pro Tips

  • If you only need some fields, remove the rest from the JSON first — the CSV will be far easier to read, and colleagues won't have to hide dozens of irrelevant technical columns in Excel.
  • Use semicolons for Excel in European locales and tabs if values contain lots of commas, such as addresses or free-text notes.
  • Open the CSV with CSV to Excel to get a real workbook with typed numbers.

Add your JSON files above and download spreadsheet-ready CSV.

Frequently Asked Questions