JSON to CSV Converter

Convert JSON data to CSV format online for free. Download as spreadsheet.

How to use JSON to CSV Converter

1

Paste Your JSON Data

Click the text input field labeled 'Paste JSON here' and paste your JSON array or object. Ensure your data is valid JSON format with proper brackets and quotation marks.

2

Click the Convert Button

Press the blue 'Convert to CSV' button located below the input field. The tool processes your data instantly in the browser without uploading to any server.

3

Review the CSV Output

Your converted CSV appears in the output preview box on the right side. Column headers are automatically extracted from JSON keys. Nested objects are flattened using dot notation (e.g., address.street).

4

Download Your File

Click the green 'Download CSV' button to save the file as filename.csv to your computer. Open with Excel, Google Sheets, or any spreadsheet application.

Related Tools

JSON to CSV converter online, convert JSON arrays to spreadsheet free

JSON to CSV converter online, convert JSON arrays to spreadsheet free

Need to get JSON data into a spreadsheet? Use ToolHQ's free JSON to CSV converter to convert JSON arrays or objects to CSV format right in your browser.

ToolHQ's JSON to CSV converter is a free browser-based tool that converts JSON arrays and objects to CSV format for use in Excel, Google Sheets, or any other spreadsheet or data tool, with your data never leaving your browser.

APIs return JSON. Spreadsheets need CSV. This converter bridges that gap instantly -- paste your JSON, get your CSV, open it in Excel.

Key Takeaways

  • Converts JSON arrays of objects to CSV with auto-detected column headers
  • Handles nested JSON objects by flattening them into column names
  • Your data never leaves your browser -- conversion runs entirely client-side
  • Output CSV is ready to open directly in Excel, Google Sheets, or any data tool
  • Free with no login, no rate limits, and no row count limits

What is JSON to CSV conversion and when do you need it?

JSON (JavaScript Object Notation) is the dominant data interchange format for APIs, databases, and web applications. CSV (Comma-Separated Values) is the universal format for tabular data in spreadsheets and data analysis tools.

According to Wikipedia's article on JSON, JSON was standardized as ECMA-404 and RFC 8259. It represents data as key-value pairs (objects) and ordered lists (arrays), making it flexible for nested, hierarchical data structures. The challenge is that spreadsheets expect flat tabular data -- rows and columns.

The RFC 4180 CSV specification defines CSV as rows of comma-separated values where the first row is typically the header. The key difference from JSON is that CSV is inherently flat -- no nesting, no arrays within arrays, just rows and columns.

Converting JSON to CSV means:

  1. Taking a JSON array where each element is an object
  2. Using the keys of those objects as CSV column headers
  3. Writing each object's values as a row in the CSV

A JSON array like:

[{"name":"Alice","age":30},{"name":"Bob","age":25}]

Becomes:

name,age
Alice,30
Bob,25

When you need to convert JSON to CSV

The JSON-to-CSV conversion workflow is one of the most common data engineering tasks at any scale.

Mini-story: Marco is a 32-year-old product manager who pulls weekly active user data from his company's internal analytics API. The API returns a JSON array of 500 user records with fields like user_id, signup_date, last_login, plan, and country. Marco pastes the JSON into ToolHQ's converter and gets a clean CSV in about three seconds. He opens it directly in Google Sheets to build his weekly dashboard update. He doesn't need to ask engineering to write a script or wait for a scheduled report.

Common situations where JSON to CSV conversion is needed:

  • Exporting data from a REST API response for spreadsheet analysis
  • Converting database query results (many databases export as JSON) for Excel
  • Preparing data from a NoSQL database (MongoDB exports JSON) for reporting
  • Moving data between tools where one outputs JSON and the other requires CSV
  • Analyzing API testing results or webhook payloads in a spreadsheet

Convert your JSON to CSV at ToolHQ


How to convert JSON to CSV

  1. Open ToolHQ's JSON to CSV converter in your browser.
  2. Paste your JSON into the input area. The JSON should be an array of objects (the most common API response format). A JSON object (non-array) is also supported.
  3. Click Convert. The tool auto-detects headers from the object keys.
  4. Download the CSV file or copy the CSV text directly from the output.
  5. Open in your spreadsheet tool. For Excel: File > Open. For Google Sheets: import via File > Import.

Tips for JSON to CSV conversion

Make sure your JSON is valid before converting. Invalid JSON (missing quotes, trailing commas, mismatched brackets) will cause conversion errors. Validate and format your JSON first using ToolHQ's JSON formatter, which also validates the syntax.

Nested objects get flattened. If your JSON has nested objects (e.g., "address": {"city": "London", "zip": "SW1A"}), the converter creates column names like address.city and address.zip. For deeply nested JSON, some data may require manual restructuring.

Arrays within objects. If a JSON field contains an array (e.g., "tags": ["a", "b", "c"]), it may be converted to a single string value or may require flattening. Check the output for array-valued fields.

Large JSON files. The converter runs in your browser. For JSON files with tens of thousands of rows, the conversion may take a few seconds. There is no imposed row limit.

Mini-story: Priya, a 37-year-old data analyst, received a 2,400-row JSON export from a CRM API containing contact records. Each contact had nested address fields and a tags array. She pasted the JSON into the converter and got a CSV with 2,400 rows and columns including address.city, address.country, and tags (as stringified arrays). She cleaned up the tags column in Excel after import using text-to-columns. The whole process -- JSON to analysis-ready spreadsheet -- took under five minutes.

For converting CSV back to JSON, use the related tool when it becomes available. For formatting and validating your JSON before converting, use ToolHQ's JSON formatter. Browse all developer tools in the ToolHQ developer category.


Handling nested JSON when converting to CSV

Flat JSON converts to CSV cleanly: each key becomes a column header and each value becomes a cell. The challenge arises with nested JSON, which is common in real API responses.

What nested JSON looks like. An API returning user records might include an address object inside each user object:

[
 {
 "id": 1,
 "name": "Alice",
 "address": {
 "city": "London",
 "country": "UK"
 },
 "tags": ["premium", "active"]
 }
]

CSV cannot represent this nesting natively. It has no concept of objects-within-objects or arrays-within-cells.

How flattening works. Most JSON-to-CSV converters, including ToolHQ's, flatten nested objects using dot notation. The address object's fields become separate columns named address.city and address.country. The resulting CSV row looks like:

id,name,address.city,address.country,tags
1,Alice,London,UK,"[""premium"",""active""]"

The nested address fields become their own columns. The tags array becomes a stringified value in a single cell, because there is no standard way to flatten an array into a flat row without knowing in advance how many elements each array will contain.

When you need to pre-process. If your nested data is deeply hierarchical (three or more levels deep) or if arrays contain variable numbers of objects, you may need to pre-process the JSON before converting. Common approaches:

  • Flatten the JSON manually in your preferred language (Python's pandas.json_normalize() is well-suited for this)
  • Pull only the top-level fields you need and discard the nested structure
  • Expand array fields into multiple rows before converting

What to do with array-valued fields. If the tags column arrives as "[""premium"",""active""]" in your spreadsheet, you can use text-to-columns or a formula to split the values. In Google Sheets, the SPLIT function with a comma delimiter handles this; in Excel, use Flash Fill or Power Query.

Knowing these limitations before you convert saves time: simple, flat JSON converts perfectly; deeply nested JSON may require a post-processing step in your spreadsheet tool.


Frequently asked questions

Is my data uploaded to a server during conversion?

No. ToolHQ's JSON to CSV converter processes your data entirely in your browser. Your data never leaves your device and is never transmitted to any server.

What JSON format does the converter expect?

The converter handles JSON arrays of objects (the most common API format), where each object becomes a row. It also handles a single JSON object, which becomes one row with keys as headers.

What if my JSON has nested objects?

Nested objects are flattened using dot notation (e.g., address.city). Deeply nested structures may require post-processing in your spreadsheet tool.

Can I convert a JSON file instead of pasting text?

If the tool supports file upload, drag or browse your JSON file directly. Otherwise, open the file in a text editor, copy the contents, and paste them into the tool.

What is JSONL and does the converter support it?

JSONL (JSON Lines, also called NDJSON or Newline Delimited JSON) is a format where each line is a separate, valid JSON object, with no enclosing array brackets:

{"id":1,"name":"Alice"}
{"id":2,"name":"Bob"}

This format is common in log files, MongoDB exports, Stripe event dumps, and streaming data pipelines. It is different from a standard JSON array. If you paste JSONL into a standard JSON-to-CSV converter, it will fail because the input is not valid JSON. To convert JSONL to CSV, first wrap the lines in a JSON array by adding [ at the start, ] at the end, and commas after each line except the last.

What if my JSON data has special characters or commas in values?

The converter wraps values in quotes when they contain commas, newlines, or quote characters, following the RFC 4180 CSV standard. These values will import correctly into Excel and Google Sheets.


The short version

JSON is how APIs and databases speak. CSV is how spreadsheets speak. ToolHQ's JSON to CSV converter translates between the two instantly, in your browser, with no server upload and no account required.

Paste your JSON, get your CSV, open it in your spreadsheet tool. Your data never leaves your browser.

For JSON validation and formatting before converting, use ToolHQ's JSON formatter. Browse all developer tools at the ToolHQ developer category.

Convert JSON to CSV now