UFOZoo

JSON to CSV — Convert JSON Arrays to CSV Instantly

Convert JSON arrays or objects to CSV format with automatic nested structure flattening. Supports custom delimiters and header options. Download as .csv.

Features

  • Instant JSON to CSV conversion — paste your data and it converts automatically as you type
  • Automatic flattening of nested objects using dot notation (e.g., user.address.city)
  • Support for complex nested structures including objects, arrays, and mixed types
  • Customizable CSV delimiters — comma (,), semicolon (;), or tab (\t) for different regional standards
  • Toggle headers on/off — include column names as the first row or export data only
  • Table preview with syntax highlighting — see your CSV data in a clean spreadsheet-like grid before downloading
  • Save as .csv file — compatible with Excel, Google Sheets, LibreOffice Calc, and any spreadsheet application
  • Drag-and-drop file open or click to browse — supports .json files up to 10MB
  • Copy to clipboard with one click — paste directly into Excel or Google Sheets without saving
  • Real-time validation with precise error location — highlights the exact line when JSON is invalid
  • Handles edge cases — special characters, commas in values, quotes, and line breaks are properly escaped
  • Entirely client-side — zero data transmission, works offline after initial load, perfect for sensitive data

How to Use

  1. 1Paste your JSON data into the left panel. It can be an array of objects, a single object, or any valid JSON structure.
  2. 2Watch as nested objects are automatically flattened using dot notation (user.name, user.address.city).
  3. 3Choose your preferred delimiter: comma for standard CSV, semicolon for European formats, or tab for TSV files.
  4. 4Toggle 'Include Headers' to add or remove the column header row based on your target application's requirements.
  5. 5Preview the converted CSV in the right panel as both a formatted table and raw text.
  6. 6Click Save to save as a .csv file that opens directly in Excel, Google Sheets, or Numbers.
  7. 7Drag and drop a .json file onto the input area to load it instantly for conversion.
  8. 8Check the flattened column names — tool uses dot notation for nested fields like address.city or items[0].name.
  9. 9Copy the CSV output directly to your clipboard and paste it into Excel or Google Sheets without saving a file.

Frequently Asked Questions

How does nested object flattening work?

Nested objects are flattened using dot notation by default. For example, {user: {name: 'Alice', address: {city: 'NYC'}}} becomes columns user.name and user.address.city. Arrays are indexed like items[0].name, items[1].name. This preserves the hierarchical relationship while creating flat CSV rows.

Which delimiter should I use?

Comma (,) is the standard for most applications and English locales. Semicolon (;) is common in European countries where comma is used as decimal separator. Tab (\t) creates TSV files which are useful when your data contains many commas. Choose based on your target application's import requirements.

Can I convert large JSON files?

Yes, there's no strict file size limit, but very large files (10MB+) may slow down your browser. For typical use cases — API responses up to 10,000 rows, configuration files, database exports — it handles them instantly. If you need to convert huge datasets (100K+ rows), consider using command-line tools like jq or Python's pandas library.

Does it handle special characters in values?

Absolutely. Values containing commas are wrapped in double quotes. Quotes inside values are escaped by doubling them ("). Line breaks within values are preserved and the value is quoted. Empty values become empty cells. This follows RFC 4180 CSV standard ensuring compatibility with Excel, Google Sheets, and all major spreadsheet applications.

What JSON structures are supported?

It supports arrays of objects (most common), single objects, and mixed structures. Each object becomes one row in the CSV. All unique keys across all objects become columns. Missing values become empty cells. Nested objects and arrays are flattened automatically. Primitive arrays ([1,2,3]) become a single row with value column.

Is my data sent to a server?

No. All conversion happens entirely in your browser using JavaScript. Your JSON data never leaves your device — we don't have servers to send it to. You can even disconnect from the internet after the page loads and it will still work perfectly. This makes it safe for converting sensitive data like customer lists, financial records, or API credentials.

Can I use this for Excel or Google Sheets?

Yes! The downloaded .csv file opens directly in Excel, Google Sheets, LibreOffice Calc, Apple Numbers, and virtually any spreadsheet application. Just click Download and open the file — no formatting or import wizard needed. You can also copy the CSV text and paste it directly into a spreadsheet cell range.

Does it work on mobile?

Yes, but the experience is better on desktop. On mobile, the input/output panels stack vertically, and you can still preview and save results. The table view adapts to small screens with horizontal scrolling. For best results when working with large datasets, use landscape mode on tablets.

How are empty or missing values handled?

Missing fields become empty cells in the CSV output. If one object has field'email' and another doesn't, the second object's email cell is empty. Null values are preserved as empty cells. Empty strings ('') become empty but quoted cells depending on your delimiter choice. This follows standard CSV conventions that all spreadsheet applications understand.

Can I convert JSON with arrays of primitive values?

Yes. For arrays like [1, 2, 3] or ['a', 'b', 'c'], the tool creates a single row with a 'value' column. For arrays of objects like [{key: 'a', val: 1}, {key: 'b', val: 2}], each object becomes a row with keys as columns. Mixed-type arrays (primitives + objects) are handled intelligently with null padding for missing fields.

Related Tools