Convert JSON to CSV Online

Free, fast, and easy. Paste your JSON or upload a file.

JSON to CSV Converter Tool

Or try an example:

How it works

  1. 1. Input your JSON

    Paste JSON directly or upload a .json file (up to 10MB).

  2. 2. Convert

    Click the convert button. Nested objects are flattened using dot notation.

  3. 3. Download

    Your CSV file downloads automatically. No data is stored on our servers.

Complete Guide to Converting JSON to CSV

When to Use This Tool

This JSON to CSV converter is perfect for developers, data analysts, and anyone who needs to transform JSON data into a spreadsheet-friendly format. Common use cases include:

  • Exporting API responses to Excel or Google Sheets
  • Converting database exports for reporting
  • Transforming log files for analysis
  • Preparing data for import into other systems
  • Creating readable reports from JSON configuration files

Step-by-Step Instructions

Option A: Paste JSON Directly

Select the "Paste JSON" tab and paste your JSON data into the text area. This is ideal for small to medium datasets or when you want to quickly test a conversion. The tool accepts both JSON arrays (multiple records) and single JSON objects.

Option B: Upload a File

Select the "Upload File" tab to drag and drop a .json file, or click to browse your files. This method is best for larger datasets up to 10MB. The file must have a .json extension and contain valid JSON data.

Converting and Downloading

Once your JSON is loaded, click the "Convert to CSV" button. The conversion happens instantly in your browser, and the CSV file downloads automatically. For uploaded files, the output filename matches your input file with a .csv extension.

Tips for Best Results

  • Ensure your JSON is valid before converting. Invalid JSON will show an error message.
  • For nested objects, fields are flattened using dot notation (e.g., user.address.city).
  • Arrays within objects are indexed numerically (e.g., items.0.name, items.1.name).
  • If your JSON has inconsistent fields across records, all unique fields will appear as columns.
  • Large files may take a moment to process. The loading indicator shows conversion progress.

Understanding JSON Format

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data format used to store and exchange data. It's human-readable and widely used in web APIs, configuration files, and data storage. JSON consists of key-value pairs organized in objects and arrays.

Valid JSON Structures for Conversion

This converter accepts two main JSON structures:

Array of Objects (Recommended)

Each object becomes a row in your CSV. This is the most common format for tabular data.

[
  {"name": "Alice", "age": 30, "city": "New York"},
  {"name": "Bob", "age": 25, "city": "Los Angeles"},
  {"name": "Carol", "age": 35, "city": "Chicago"}
]

Single Object

A single object is converted to one row of data.

{"name": "Alice", "age": 30, "city": "New York"}

Handling Nested Data

Real-world JSON often contains nested objects and arrays. Our converter flattens these automatically using dot notation:

Input JSON

{
  "user": {
    "name": "Alice",
    "address": {
      "city": "NYC",
      "zip": "10001"
    }
  },
  "orders": [
    {"id": 1, "total": 99},
    {"id": 2, "total": 150}
  ]
}

CSV Columns

user.name
user.address.city
user.address.zip
orders.0.id
orders.0.total
orders.1.id
orders.1.total

Common JSON Mistakes

  • Missing quotes around keys: Use {"name": "value"} not {name: "value"}
  • Single quotes: JSON requires double quotes. Use "text" not 'text'
  • Trailing commas: Remove the comma after the last item in arrays and objects
  • Unescaped special characters: Escape quotes inside strings with backslash: \"

Understanding Your CSV Output

What is CSV?

CSV (Comma-Separated Values) is a simple text format for storing tabular data. Each line represents a row, and values are separated by commas. CSV files can be opened in Excel, Google Sheets, Numbers, and most database tools, making it the universal format for data exchange.

How Flattening Works

Since CSV is a flat format (rows and columns only), nested JSON structures must be flattened. Our converter uses dot notation to preserve the hierarchical relationship:

  • Nested objects: user.profile.name indicates name inside profile inside user
  • Array items: items.0, items.1, items.2 for each array element
  • Nested arrays: orders.0.products.0.name for deeply nested structures

CSV Formatting Rules

The converter handles special characters automatically to ensure your CSV opens correctly:

  • Commas in values: Values containing commas are wrapped in double quotes
  • Quotes in values: Double quotes are escaped by doubling them ("")
  • Line breaks: Newlines within values are preserved and the value is quoted
  • Empty values: Null or undefined values become empty cells

Working with Variable Schemas

When your JSON objects have different fields (some records have properties others don't), the converter creates columns for all unique fields found across all records. Records missing a field will have an empty cell in that column. This ensures no data is lost during conversion.

Opening Your CSV File

After downloading, you can open your CSV in:

  • Microsoft Excel: Double-click the file or use File → Open
  • Google Sheets: Upload to Google Drive or File → Import
  • Apple Numbers: Double-click or drag into Numbers
  • Text editors: Open in VS Code, Notepad++, or any text editor to see raw data

Frequently Asked Questions

Is my data safe? Where is it processed?
Your data is completely safe. All conversion happens directly in your browser using JavaScript. Your JSON data is never uploaded to our servers or stored anywhere. Once you close the page, your data is gone. We take privacy seriously.
What is the maximum file size I can convert?
The maximum file size is 10MB. This limit exists to ensure the conversion runs smoothly in your browser without causing performance issues. For larger files, consider splitting your JSON into smaller chunks.
What browsers are supported?
This tool works on all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. We recommend using the latest version of your browser for the best experience. Mobile browsers are also supported.
Can I convert nested JSON with arrays?
Yes! Nested objects and arrays are automatically flattened using dot notation. For example, user.address.city for nested objects and items.0.name for array elements. This preserves all your data in a flat CSV structure.
Why am I getting an "Invalid JSON" error?
Common causes include: missing double quotes around keys or string values, trailing commas after the last item, single quotes instead of double quotes, or unescaped special characters. Use a JSON validator to check your data before converting.
Is this tool free to use?
Yes, this JSON to CSV converter is completely free with no usage limits. Convert as many files as you need. We sustain the service through non-intrusive advertising.
Do I need to create an account?
No account or registration is required. Simply paste your JSON or upload a file and convert immediately. No email, no sign-up, no hassle.
Can I use this tool offline?
While the tool requires an initial internet connection to load, once the page is loaded, the conversion functionality works entirely in your browser. However, for the best experience and to ensure you have the latest version, we recommend using it online.