Skip to main content

    JSON to CSV Converter

    Convert JSON arrays to CSV format. Download as .csv or copy to clipboard. Handles nested data.

    Free to use. Runs in your browser.

    Paste a JSON array of objects to convert it to CSV with a header row. Handles nested objects by flattening with dot notation.

    When You Need CSV Instead of JSON

    JSON is the language of APIs and modern web apps. CSV is the language of spreadsheets, data analysis, and legacy systems. The reality is that most business people live in Excel and Google Sheets, they can't open a JSON file and make sense of it, but hand them a CSV and they're instantly productive.

    Think of JSON as a structured filing cabinet with labelled folders inside folders. CSV is a flat table, rows and columns, like a spreadsheet. Converting between them means flattening that nested structure into something tabular. Simple objects convert cleanly. Deeply nested JSON needs some decisions about how to represent nested data in flat columns.

    This tool handles the conversion client-side, your data stays in your browser. Paste JSON, get CSV. No upload, no server, no risk.

    JSON vs CSV Comparison

    FeatureJSONCSV
    StructureNested, hierarchicalFlat, tabular
    Data typesString, number, boolean, null, array, objectEverything is a string
    ReadabilityMachine-friendly, decent for developersHuman-friendly, opens in any spreadsheet
    File sizeLarger (keys repeated per object)Smaller (headers only once)
    Nesting supportUnlimited nesting depthNone, flat rows only
    Standard specRFC 8259 (strict)RFC 4180 (loosely followed)
    Best forAPIs, config files, NoSQL databasesSpreadsheets, data import/export, reporting

    What this means for you: Use JSON when your data has relationships and nesting. Use CSV when you need to share data with non-technical people or import into spreadsheet software.

    Handling Edge Cases

    Nested Objects

    When a JSON value is an object, the converter flattens it using dot notation:address.city becomes a column header. This preserves the relationship without losing data.

    Arrays in Values

    If a field contains an array like ["a","b","c"], it gets stringified in the CSV cell. For proper tabular representation, consider restructuring the JSON first.

    Commas in Values

    CSV uses commas as delimiters, so values containing commas get wrapped in double quotes automatically. A value like "London, UK" becomes "London, UK" in the output.

    Missing Fields

    Not every JSON object needs the same keys. If object #3 has a field that objects #1 and #2 don't, those cells are simply left empty in the CSV. No data is lost.

    Common Use Cases

    API data exports are the most common scenario, you've pulled user records, transaction logs, or analytics from a REST API and need to share it with a team that works in Excel. E-commerce platforms regularly export order data as JSON that needs CSV conversion for accounting software. Data migration between systems often requires JSON→CSV as an intermediate step.

    Database exports from MongoDB and Firebase come as JSON by default. Converting to CSV lets you use standard data analysis tools like Excel, Google Sheets, or Python's pandas library for quick analysis without writing parsing code.

    Handling Tricky JSON Structures

    Nested Objects

    JSON like {"address": {"city": "London"}} needs flattening for CSV. Most tools create columns like address.city. If your JSON is deeply nested (3+ levels), consider flattening it with jq first.

    Arrays in Values

    A field like "tags": ["red", "blue"] doesn't map cleanly to a single CSV cell. Common solutions: join with a delimiter (red|blue), create separate rows, or create numbered columns (tag_1, tag_2).

    Missing Fields

    Unlike databases, JSON objects can have different keys in each record. When converting, missing fields become empty CSV cells. This is normal, just make sure your spreadsheet formula handles blanks gracefully.

    Special Characters

    Commas, quotes, and newlines inside JSON values need proper CSV escaping. Fields containing commas must be wrapped in double quotes. Fields containing quotes need the quotes doubled (""). This tool handles all of that automatically.

    Related Tools

    How to use this tool

    1

    Paste a JSON array of objects into the input area

    2

    Click Convert to CSV to generate the tabular output

    3

    Copy the result to clipboard or download as a .csv file

    Common uses

    • Exporting API response data to Excel or Google Sheets
    • Converting MongoDB exports to spreadsheet format
    • Preparing JSON data for import into legacy database systems
    • Sharing structured data with non-technical team members

    Share this tool

    Frequently Asked Questions

    What format does the JSON need to be?
    An array of objects, e.g. [{"name":"Alice","age":30},{"name":"Bob","age":25}]. Each object becomes a row in the CSV output.
    How are nested objects handled?
    Nested objects and arrays are stringified as JSON within the CSV cell. For deeply nested data, you may want to flatten the JSON first.
    Does this handle special characters?
    Yes, values containing commas, quotes, or newlines are properly escaped with RFC 4180 compliant double-quoting.
    Can I convert a single JSON object (not an array)?
    The tool expects an array of objects. Wrap a single object in square brackets: [{...}] to convert it to a one-row CSV.
    Is my data sent to a server?
    No. All conversion happens in your browser using JavaScript. Nothing is uploaded, stored, or transmitted.
    What if objects have different keys?
    The tool collects all unique keys across all objects to build the CSV header. Missing fields in individual objects are left as empty cells.
    Can I download the result as a .csv file?
    Yes. Click the Download .csv button to save the converted data as a file that opens in Excel, Google Sheets, or any spreadsheet application.
    What's the maximum JSON size I can convert?
    There's no hard limit, but very large files (over 10MB) may slow down your browser since everything runs client-side. For massive datasets, use a command-line tool like jq.
    Does this preserve data types?
    CSV has no data types, everything becomes a string. Numbers, booleans, and nulls are converted to their text representation. Your spreadsheet may auto-detect number formatting.
    How are arrays within values handled?
    Arrays like ["a","b","c"] are serialised as a JSON string within the CSV cell. If you need each array element as a separate row, restructure the JSON before converting.
    Can I convert CSV back to JSON?
    Yes, use our CSV to JSON converter for the reverse direction. Both tools run entirely in your browser.
    What delimiter does the CSV use?
    Standard comma (,) as the delimiter, which is the RFC 4180 standard. Most spreadsheet applications auto-detect this format.

    Results are for general informational purposes only and should be checked before use. They are not professional advice. See our Disclaimer and Terms of Service.