Free JSON to CSV Converter β€” Convert JSON Array to CSV Online

Paste a JSON array of objects and instantly convert it to CSV. Choose your delimiter, include or exclude headers, then copy or download your file. Everything runs in your browser β€” no data is sent anywhere.

Advertisement Β· 728Γ—90
CSV Output
Advertisement Β· 300Γ—250

When Should You Convert JSON to CSV?

JSON (JavaScript Object Notation) and CSV (Comma-Separated Values) are two of the most widely used data formats, each optimised for a different context. JSON excels at representing hierarchical, nested data structures and is the default format for REST APIs, NoSQL databases, and configuration files. CSV, on the other hand, is a flat, tabular format that is universally supported by spreadsheet applications, data analysis tools, and relational databases. Converting from JSON to CSV makes sense whenever you need to take API data, export records from a JavaScript application, or share structured data with a non-technical audience who works in Excel or Google Sheets.

Common scenarios for JSON-to-CSV conversion include exporting user records from a web application, preparing data for upload into a CRM or marketing platform, feeding rows into a data pipeline, and generating reports from API responses. Business analysts often receive raw data exports in JSON format from developers and need to convert them to spreadsheets for pivot tables, charts, and further analysis.

Understanding JSON Array Structure

This converter expects a JSON array of objects β€” the most common structure returned by REST APIs. An array of objects looks like this: an outer square bracket enclosing multiple objects separated by commas, where each object is a curly-brace block of key-value pairs. Every object represents one row in the output CSV, and the keys of the objects become the column headers.

The converter automatically discovers all unique keys across the entire array, so it handles data where not every object has the same fields β€” missing values produce empty cells in the CSV output. Numeric values, booleans, and null values are converted to their string representations. If a field value contains the delimiter character, commas, double quotes, or newlines, the converter wraps the value in double quotes and escapes any internal double quotes by doubling them, which follows the RFC 4180 CSV standard.

The converter does not support deeply nested JSON objects in a single cell β€” nested objects will be serialised as their JSON string representation. If you have nested data you need to flatten, consider preprocessing the JSON (using tools like jq in the command line or a custom JavaScript transformation) before using this converter.

CSV vs JSON for Data Exchange

Choosing between CSV and JSON depends on your use case. JSON supports complex, nested data types and is the natural choice for API communication, configuration, and any scenario requiring a self-describing format with type information. CSV is strictly flat and does not encode types β€” every value is a string unless the consuming application interprets it β€” but its simplicity is also its strength: virtually every data tool from Microsoft Excel to PostgreSQL's COPY command to Python's pandas library can read and write CSV without any special parsing library.

For bulk data transfer between systems where the schema is fixed and flat (such as user lists, product catalogs, transaction records, or log exports), CSV is often more efficient than JSON. A CSV file containing the same data as a JSON array will typically be 30–50% smaller because it omits the repeated key names present in each JSON object. For very large datasets (millions of rows), this size difference has meaningful implications for storage and transfer costs.

Importing CSV in Excel and Google Sheets

Once you have downloaded the CSV file from this tool, importing it into your spreadsheet application of choice is straightforward. In Microsoft Excel, go to Data β†’ Get Data β†’ From Text/CSV, select your file, and choose the matching delimiter in the import wizard. Excel will correctly parse quoted fields and display them in separate columns. In Google Sheets, go to File β†’ Import, upload the CSV file, and set the separator to match the delimiter you chose (comma, semicolon, or tab). Google Sheets also detects delimiters automatically when you select "Detect automatically."

If you chose the semicolon delimiter, it is because your locale uses a comma as the decimal separator (common in Europe) and Excel in that locale treats semicolons as the CSV field separator. When sharing CSV files across locales, it is worth noting in your communication which delimiter was used. The tab-delimited variant (TSV) is particularly useful for data containing commas naturally, such as addresses, descriptions, and financial figures, because it avoids ambiguity with the delimiter character.

Handling Special Characters in CSV

RFC 4180 defines the standard for CSV formatting. Fields containing the delimiter character, double-quote characters, or newline characters must be enclosed in double quotes. Any double-quote character within a field is escaped by replacing it with two consecutive double-quote characters (""). This converter follows this standard automatically β€” you do not need to pre-process your data before pasting it.

Unicode characters (including emoji, accented characters, and non-Latin scripts) are preserved as-is in the output. The downloaded CSV file uses UTF-8 encoding, which is the modern standard and is supported by Excel 2016 and later, Google Sheets, LibreOffice Calc, and virtually all data processing tools. If you open the file in an older version of Excel and see garbled characters, try importing it manually and selecting UTF-8 encoding in the import wizard.

Programmatic Alternatives

For automation and large-scale data conversion, you may want to use programmatic tools. In Python, the built-in csv module combined with json makes conversion straightforward: load the JSON with json.loads(), extract the keys as fieldnames, and write with csv.DictWriter. The pandas library makes this even simpler: pd.DataFrame(data).to_csv('output.csv', index=False). In Node.js, libraries like json2csv and Papa Parse provide robust conversion with extensive options. In jq (command-line JSON processor), you can pipe JSON into a CSV format using array construction and @csv output formatting. This browser-based tool is ideal for quick one-off conversions without any setup.

Frequently Asked Questions

The tool expects a JSON array of objects β€” for example, [{"name":"Alice","age":30},{"name":"Bob","age":25}]. Each object in the array becomes one row in the CSV, and the object keys become the column headers. Nested objects and arrays within a field will be serialised as their JSON string representation rather than flattened.

Choose Comma for most English-locale systems, including Google Sheets and US-locale Excel. Choose Semicolon if you are in a European locale where Excel uses semicolons as the CSV separator. Choose Tab (TSV) if your data naturally contains commas, such as in address fields or product descriptions, as this avoids ambiguity and quoting overhead.

The converter collects all unique keys found across every object in the array and uses the union as the header row. Objects missing a particular key will have an empty cell in that column. The column order follows the key discovery order (the order keys appear across all objects from first to last).

No. All conversion logic runs entirely in your browser using JavaScript. Your JSON data is never transmitted to or stored on any server. This makes the tool safe to use with sensitive or confidential data.

The downloaded file uses UTF-8 encoding, which is the modern standard for text files and is supported by all current spreadsheet applications, databases, and programming languages. If an older version of Microsoft Excel does not detect the encoding automatically, use Data β†’ From Text/CSV and select UTF-8 in the import wizard.

Nested objects and arrays are converted to their JSON string representation in the CSV cell. Full flattening (e.g. turning {"address":{"city":"London"}} into an address.city column) is not currently supported. For complex flattening needs, pre-process the JSON using Python's pandas with json_normalize(), or the command-line tool jq, before pasting into this converter.

Related Free Tools

Need a custom tool built for your business?

Get a Free Quote