JSON 转 Excel 转换器(JSON 转 XLSX)
将 JSON 对象数组转换为 .xlsx 电子表格。嵌套对象会变成 address.city 这样的点号列名,每个键都有自己的一列。
输入
提示:按 Ctrl + Enter 运行
已保存的设置
下方的详细帮助目前仅提供英文版。
关于此工具
API responses and exported data often arrive as JSON, which is hard to scan and impossible to sort or filter without code. This converter turns a JSON array of objects into a spreadsheet: each object becomes a row and each key a column, including keys that only some objects have.
Nested objects are flattened into dotted column names (address.city, stock.toronto), so the data stays readable in Excel, Google Sheets or LibreOffice.
使用方法
- Paste a JSON array of objects, or choose a .json file.
- Run the conversion.
- Download the .xlsx and open it in your spreadsheet app.
计算原理
The JSON is parsed; each object is flattened (nested keys joined with dots, arrays written as JSON text). The union of all keys forms the header row, in first-seen order, and values keep their types.
keys of all objects → columns; one object → one row计算示例
An e-commerce assistant pastes two product records from an API, one of which has an extra “colour” field and both of which have nested stock counts per store. The spreadsheet has 2 rows and 5 columns (sku, price, stock.calgary, stock.toronto and colour) with an empty cell where a product has no colour.
示例输入和结果
选择文件并点击“运行”。转换后的文件会直接从浏览器下载。
局限性
- Works best with an array of objects; plain values in an array go into a single “value” column.
- Arrays inside objects are not expanded into rows.
- One sheet per workbook.
最后更新:
常见问题
What if my JSON is a single object?
It becomes one row. If the object only wraps an array, such as {"items": […]}, that array is used.
How are arrays inside objects handled?
They are written as JSON text in one cell.
Is there a column limit?
Up to 16,384 columns, the Excel maximum; browser memory limits very large files.
故障排除
It says the JSON is invalid.
Check for trailing commas or single quotes; use the JSON formatter to find the error.
Columns are in an odd order.
They follow the order in which keys first appear.
Numbers became text.
Quoted numbers in JSON ("12") stay text; remove the quotes in the source.
隐私 & 免费使用
我的输入会被保存吗?
你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。
这个工具免费吗?
是的。无需注册或付费。