🧩

JSON to Excel

Convert a JSON array of objects into a downloadable Excel (.xlsx) workbook.

POST 1 credit /v1/convert/json-to-excel
curl -X POST "https://convert.toolkitapi.io/v1/convert/json-to-excel" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"data": [{"name":"Alice","age":30},{"name":"Bob","age":25}], "sheet_name": "People"}'
import httpx

resp = httpx.post(
    "https://convert.toolkitapi.io/v1/convert/json-to-excel",
    json={"data": [{"name":"Alice","age":30},{"name":"Bob","age":25}], "sheet_name": "People"},
)
print(resp.json())
const resp = await fetch("https://convert.toolkitapi.io/v1/convert/json-to-excel", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"data": [{"name":"Alice","age":30},{"name":"Bob","age":25}], "sheet_name": "People"}),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "rows": 2,
  "columns": 2,
  "file_size": 5102,
  "file_url": "https://convert.toolkitapi.io/v1/convert/download/abc123.xlsx",
  "file_name": "output.xlsx",
  "file_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}

Description

Convert a JSON array of objects into a downloadable Excel (.xlsx) workbook.

How to Use

1

1. POST a JSON array of flat objects in the `data` field.

2

2. Optionally set `sheet_name` for the worksheet tab name.

3

3. Download the generated workbook via `file_url`.

About This Tool

JSON to Excel takes a JSON array of objects and renders it as a native `.xlsx` workbook. Object keys become the column headers, preserving insertion order so your spreadsheet columns match the shape you passed in.

The endpoint returns a presigned download URL together with row and column counts. Nested objects are flattened using dot-notation keys.

Why Use This Tool

Frequently Asked Questions

What if objects have different keys?
The union of all keys becomes the column set. Missing values are written as empty cells.
Are nested objects supported?
Nested objects are flattened using dot-notation keys (e.g. `address.city`). Arrays are JSON-stringified into a single cell.
Can I control column order?
Column order follows the insertion order of keys in the first object. Reorder keys in your JSON to change the output order.

Start using JSON to Excel now

Get your free API key and make your first request in under a minute.