Hongmu Notes

📥 JSON to Excel

Paste the JSON array, preview the table first, and then export to xlsx or csv; object arrays and two-dimensional arrays are supported, and the fields are sorted by first occurrence.
100% Browser local processing 0 Data upload

📥 Conversion settings

💡 Instructions for use

  • Arrays of objects (one object per row) are best for export: field names automatically become table headers, and fields are ordered by first occurrence in each row.
  • The two-dimensional array (one array per row) is spread out in the original order, and the first row is usually used as the field name row; select "No" to not write the field name row.
  • When some rows have fewer fields than other rows, the missing positions are filled with blanks or zeros according to the "How to handle missing fields" setting to avoid misalignment of the entire column.
  • It is recommended to preview before exporting: the preview and exported files use the same data. If the preview is correct, the file content will be consistent.
  • Excel is downloaded in xlsx format and can be opened directly with spreadsheet software; CSV is suitable for importing into a database or script processing.
  • The pasted content is only parsed and generated in the browser, and is not uploaded or saved; you need to paste it again after refreshing the page.

🧩 How to deal with the two JSON structures respectively

Object array is the most common form returned by the interface: each row is a record, and the key name is the column name. During conversion, the keys of each row are combined in the order of first appearance as the header, and the missing fields are left blank. Two-dimensional arrays do not have column name information and can only be spread according to element positions. Therefore, the first row is often manually added field names. When selecting a row without field names, it will be treated as ordinary data. Before converting, you need to see clearly which type the data belongs to, and you can tell it at a glance in the preview.

You can judge whether the structure recognition is correct by first looking at whether the first line of the preview is a field name.

📐 Why are fields ordered by first occurrence?

In the data returned by the interface, the order of fields in different records may be inconsistent: some are given numbers first, and some are given names first. If the column order is determined based on a certain row, fields in other rows may be sorted to the back, making it look cluttered. Arrange the fields in each row according to the order of first appearance. The column sequence of the same batch of data is stable. There will be no column position drift when data from the same source is converted multiple times, making it easier to compare with existing tables.

When you need to fix the column order, first unify the writing order of the fields in the data source.

🔒 Why is it not recommended to transfer data to the server?

The JSON to be exported often contains business data such as order details, customer lists, work order records, etc. Uploading to a third-party server means that these contents are out of control. The analysis, generation and downloading of this tool are all completed in the browser, no upload request is initiated, and it can also be used even when the network is disconnected. The price is that due to browser memory limitations, very large arrays may be processed slowly. In this case, it is recommended to handle it in a local script.

JSON containing customer information is preferably converted locally to avoid data outflow.

🔗 All keywords and tutorials

Keywords page of the tool12a

Return to tool home page

❓ FAQ

Will the data be uploaded??
No. JSON content and generated tables are processed in the browser and are not sent to the server, so they can be used even when offline.
What happens to nested objects?
The nested part will be written into the cell as text; when it needs to be split into multiple columns, please expand it into a flat field in the data source first.
Will there be garbled characters in Chinese??
No. Both xlsx and csv are generated according to UTF-8, and Chinese can be displayed normally; if garbled characters appear when opening the csv in Excel, just use the import function to specify UTF-8.
How many rows can be converted at most??
Depending on the browser memory, it is generally smooth within tens of thousands of lines; the preview only displays the first few lines, and the export includes all data.
Can I export multiple worksheets at one time??
Export one page at a time. When multiple sheets are needed, convert them in batches and then merge them in the worksheet software.