← All tools Converters

JSON to CSV / CSV to JSON

Convert between JSON and CSV in either direction. Supports nested objects, multiple delimiters, and instant download. Everything runs locally in your browser.

Options
0 chars

100% client-side

All conversion runs entirely in your browser. Your data is never sent to any server. Nested objects are flattened using dot notation.

What Is CSV and Why Does It Matter?

CSV (Comma-Separated Values) is one of the oldest and most universal data exchange formats. Every spreadsheet application — Excel, Google Sheets, LibreOffice Calc — can open CSV files. Every programming language has built-in or standard-library support for reading and writing them. When you need to move tabular data between systems that have nothing else in common, CSV is the reliable lowest common denominator.

JSON (JavaScript Object Notation), on the other hand, is the dominant format for APIs and modern web applications. It supports nested structures, typed values, and is natively understood by JavaScript. The need to convert between these two formats comes up constantly in data pipelines, analytics, and everyday development.

Common Use Cases for JSON-CSV Conversion

API Data to Spreadsheet

REST APIs return JSON, but stakeholders often need data in Excel. Converting JSON to CSV bridges the gap between developers and business teams who work in spreadsheets.

Database Export and Import

Many databases export data as CSV. Converting that CSV to JSON makes it easy to import into NoSQL databases like MongoDB, or to use in frontend applications.

Data Analysis Pipelines

Data scientists often receive JSON from web scraping or APIs but need CSV for tools like pandas, R, or Tableau. Quick conversion saves scripting time.

Configuration and Bulk Uploads

Many platforms accept CSV for bulk imports (products, users, translations). If your source data is in JSON, converting to CSV lets you upload directly.

Handling Nested JSON in CSV

CSV is inherently flat — it has rows and columns, with no concept of hierarchy. When your JSON objects contain nested structures, those need to be flattened to fit the tabular format. The most common approach is dot notation: a nested path like address.city becomes a single column header.

{ "user": { "name": "Alice" } } → user.name: Alice

This tool automatically flattens all nested objects using dot notation. Arrays within objects are serialized as JSON strings in the corresponding CSV cell, preserving the data while keeping the output parsable by spreadsheet applications.

Tip: deeply nested data

If your JSON has many levels of nesting, the resulting CSV headers can get long (e.g., config.database.connection.host). Consider simplifying the JSON structure before converting if the CSV will be used in a spreadsheet.

Frequently Asked Questions

How do I convert JSON to CSV?

Paste a JSON array of objects into the input field, choose your delimiter, and click Convert. The tool auto-detects all keys across every object and generates a CSV with one column per key. Nested objects are flattened using dot notation.

How do I convert CSV to JSON?

Switch to CSV to JSON mode, paste your CSV data, and click Convert. If your CSV has a header row, keep the header toggle on so each row becomes a named object. Otherwise the output is an array of arrays.

How are nested JSON objects handled in CSV?

Nested objects are flattened using dot notation. For example, an object with address.city becomes a single column. Arrays inside objects are serialized as JSON strings in the CSV cell.

What CSV delimiters are supported?

Three delimiters are supported: comma (standard .csv), semicolon (common in European locales), and tab (.tsv files). Select the appropriate delimiter before converting.

Is my data safe when using this converter?

Yes. All conversion happens entirely in your browser using JavaScript. No data is uploaded to any server. You can verify this by disconnecting from the internet and confirming the tool still works.

Related Tools