JSON to Excel conversion turns structured API responses, database exports, and config dumps into an .xlsx workbook that analysts and stakeholders can filter, sort, and chart without writing code. JSON (JavaScript Object Notation, RFC 8259) is the default wire format for REST and GraphQL APIs; Excel is still the default review surface for finance, operations, and ad hoc QA. This guide explains which JSON shapes map cleanly to rows and columns, how nested data breaks flat spreadsheets, Excel hard limits, privacy choices, and how to download a workbook from JSON with the free JSON to Excel Converter in your browser.
Array of Objects
Excel Output
Rows Per Sheet (Excel)
Browser Conversion
Key facts: JSON to Excel (quick reference)
Use this section when you need a direct answer for search or AI summaries:
- Best input shape: A JSON array of objects where each object shares the same top-level keys (for example,
[{"id":1,"name":"A"},{"id":2,"name":"B"}]). Each object becomes one spreadsheet row; each key becomes a column header. - Single object: One JSON object
{"a":1,"b":2}converts to a single data row (or one row plus headers, depending on the tool). - Nested JSON: Excel cells hold scalar values (text, numbers, dates, booleans). Nested objects and arrays do not map to one cell without flattening or stringifying. Many converters (including ours) stringify nested values into one cell rather than exploding child rows.
- File extension: Modern Excel workbooks use
.xlsx(Office Open XML). Legacy.xlsis a different binary format; most online tools output.xlsx. - Excel row limit: 1,048,576 rows per worksheet in Excel 2007 and later. Column limit: 16,384 (column XFD). Cell text limit: 32,767 characters.
- JSONL / NDJSON: One JSON value per line is not a single JSON document. Wrap lines into an array first (see JSONL vs JSON) or use the JSONLINE to JSON converter, then export to Excel.
- Privacy: The JSON to Excel Converter uses JavaScript (SheetJS) in your browser. Pasted JSON is not sent to OnlineMiniTools servers for conversion.
- When CSV is enough: If you only need a flat table and no Excel formulas, JSON to CSV produces smaller files and opens in Excel the same way.
What is JSON, and why export it to Excel?
JSON encodes structured data as text: objects in curly braces, arrays in square brackets, strings in double quotes, and literals for numbers, booleans, and null. APIs return JSON because it is compact, language-neutral, and easy for programs to parse. Excel is optimized for human review: filters, pivot tables, conditional formatting, and sharing with people who do not use IDEs or terminals.
Typical reasons to convert JSON to Excel:
- API QA: Paste a staging API response, download
.xlsx, and compare columns with a product owner or support lead. - One-off reporting: Export user lists, orders, or inventory snapshots from an admin JSON endpoint without building a full BI pipeline.
- Data cleanup: Spot missing fields, duplicate IDs, or wrong types in a grid before importing into a database.
- Handoff to finance: JSON from billing or ERP middleware becomes a workbook finance can reconcile in familiar templates.
- Training and documentation: Sanitized sample rows in Excel are easier for non-developers to read than raw JSON in a code editor.
JSON shapes that work (and shapes that need extra steps)
Spreadsheet export is a flattening problem. You are projecting a tree (JSON) onto a grid (rows and columns). The projection is lossless only when every cell maps to a single scalar path. When JSON contains depth, you must choose a strategy: dot-separated columns (address.city), row explosion for child arrays, separate sheets per child collection, or JSON text inside one cell.
| JSON pattern | Excel mapping | Difficulty |
|---|---|---|
| [{ "id": 1, "sku": "A" }, …] | One row per object; headers from keys | Easy |
| { "id": 1, "sku": "A" } | Single row (one record export) | Easy |
| { "meta": {…}, "data": […] } | Extract data array first; ignore or flatten meta |
Medium |
| { "user": { "name": "…", "address": {…} } } | Flatten to user.name, user.address.city, or stringify nested object |
Medium |
| { "items": [ {…}, {…} ] } | Explode items to multiple rows, or child sheet linked by order ID | Hard |
| JSONL (one object per line) | Convert to JSON array, then export | Medium |
Example: flat array ready for Excel
[
{ "order_id": "ORD-1001", "status": "shipped", "total": 42.50, "currency": "USD" },
{ "order_id": "ORD-1002", "status": "pending", "total": 19.00, "currency": "USD" }
]
After conversion you expect columns order_id, status, total, currency and two body rows.
Example: wrapped API response (extract before convert)
{
"page": 1,
"total": 2,
"results": [
{ "id": 10, "email": "[email protected]" },
{ "id": 11, "email": "[email protected]" }
]
}
Copy only the results array into the converter, or use a JSON Formatter to isolate the array in your editor first. Top-level pagination fields usually should not become columns on every row unless you intentionally repeat them.
JSON vs CSV vs Excel: which output should you pick?
| Format | Strengths | Weaknesses |
|---|---|---|
| JSON | Nested structure, API-native, schema-flexible | Poor fit for non-technical reviewers; no built-in grid UI |
| CSV | Smallest flat export; universal import | No types, sheets, or styling; comma/quote edge cases |
| XLSX (Excel) | Multiple sheets (in advanced tools), familiar UX, filters | Larger files; still flat per sheet unless you model relations |
Method 1: Convert JSON to Excel online (fastest for flat data)
For an array of objects with scalar fields, the JSON to Excel Converter is the quickest path: paste JSON, set an output filename, download .xlsx. The tool uses the SheetJS (xlsx) library in the browser, so your payload stays on your machine.
- Open the JSON to Excel Converter.
- Validate JSON first if the paste came from logs (trailing commas and single quotes are common failures). The JSON Formatter helps spot syntax errors.
- Paste your JSON into the input area. Use an array of objects when possible. If the API wrapped data in
resultsordata, paste only that array. - Optionally change the output filename (default
converted_data.xlsx). - Click Convert and download Excel. Open the file in Excel, LibreOffice Calc, or Google Sheets (upload).
Tool limitation (important): The converter targets one level of object properties. Nested objects and arrays are stringified into a single cell rather than expanded into extra columns or child rows. For deeply nested API payloads, flatten in code (see Method 2) or export to CSV after normalization.
Method 2: Python with pandas (nested flattening and automation)
For repeatable pipelines, normalize JSON before Excel sees it. pandas.json_normalize flattens nested dicts into dotted column names and can explode arrays of records when you pass record_path and meta.
import pandas as pd
records = [
{"id": 1, "customer": {"name": "Ada", "tier": "gold"}, "tags": ["api", "beta"]},
{"id": 2, "customer": {"name": "Lin", "tier": "silver"}, "tags": ["web"]},
]
df = pd.json_normalize(records, sep=".")
df.to_excel("customers.xlsx", index=False)
Install dependencies with pip install pandas openpyxl. Use record_path when each parent row contains an array of child objects that should become multiple Excel rows (for example, order line items).
Method 3: Microsoft Excel Power Query
Excel on Windows and Mac can import JSON via Data → Get Data → From File → From JSON (Power Query). Power Query shows nested fields as Record or List types; you expand columns step by step in the UI. This works well for one-off imports when you already live in Excel and the file is small enough to load entirely.
- Pros: No code; interactive preview; refreshable query if the JSON file path is stable.
- Cons: Tedious for deeply nested graphs; hard to reproduce in CI compared to a script.
Method 4: Node.js or CLI (developer workflows)
The same SheetJS API powers many JavaScript exporters: parse JSON, json_to_sheet, write .xlsx. For large files on disk, streaming parsers (for example, line-delimited JSON) avoid loading gigabytes into RAM. Open-source CLIs such as json2excel-cli focus on flattening and optional array explosion for analytics-shaped output.
Common mistakes when converting JSON to Excel
- Pasting invalid JSON: JavaScript-style comments, trailing commas, or single-quoted keys break
JSON.parse. Fix syntax before conversion. - Mixing schemas: If row 50 adds a new key, some rows will have empty cells for older keys. That is normal; union-of-keys is the expected spreadsheet behavior.
- Large integers and IDs: Excel may display long numeric IDs in scientific notation. Prefix with an apostrophe, format cells as Text, or keep IDs as strings in JSON (
"order_id": "9223372036854775807"). - Date strings vs Excel dates: ISO-8601 strings (
2024-01-15T12:00:00Z) import as text unless you parse them. For reporting, convert to Excel date serials in a script or use Power Query type detection. - Unicode and emoji: JSON and XLSX both support UTF-8 text; garbled characters usually mean an intermediate step was saved as Latin-1. Keep the chain UTF-8 end to end.
- Secrets in JSON: API tokens, PII, and session cookies belong in secure stores, not shared workbooks. Redact before pasting into any online tool, even when conversion is local.
- Exceeding row limits: More than 1,048,576 records require splitting across sheets or files, or staying in a database / Parquet workflow instead of Excel.
Reverse direction: Excel back to JSON
After manual edits, you may need JSON again for an API import. Use the Excel to JSON Converter for the return trip. Keep column headers stable so keys match your original schema.
Related tools on OnlineMiniTools
- JSON to CSV Converter for lightweight flat exports.
- Excel to JSON Converter for round-trip editing workflows.
- JSON Formatter to validate and pretty-print before export.
- JSONLINE to JSON when your source file is newline-delimited JSON.
Frequently Asked Questions
Can I convert nested JSON to Excel with separate columns?
Yes, but you usually need a flattening step first (dot notation like address.city, or pandas.json_normalize). The OnlineMiniTools JSON to Excel Converter is optimized for flat objects and stringifies nested structures into one cell. Use Python or a dedicated flattening CLI for deep nesting.
What JSON structure works best with the online JSON to Excel tool?
An array of objects with scalar values at the top level works best. Example: a list of users with id, name, email, and status fields. A single object converts to one row. Wrapped API responses should be reduced to the inner array before pasting.
Is my JSON uploaded to your servers?
No. The JSON to Excel Converter runs SheetJS in your browser. Data you paste is processed locally in the tab. Still avoid pasting production secrets or personal data on shared computers.
JSON vs CSV for Excel: which should I download?
Choose CSV when you only need a flat table and smallest file size. Choose XLSX when reviewers expect a native Excel workbook or you plan to add sheets and formatting later. Both open in Excel.
How do I convert JSON Lines (JSONL) to Excel?
JSONL is not one JSON document. Convert lines to a JSON array first with the JSONLINE to JSON tool or a script, then run JSON to Excel on the array. See our JSONL vs JSON guide for format rules.
When you need a spreadsheet from an API dump fast, start with flat JSON and the JSON to Excel Converter. When nesting, schema drift, or million-row limits show up, flatten in pandas or Power Query, split files, or keep the canonical dataset in JSON and use Excel only as a review slice.