Convert JSON to Excel without losing leading zeros

Keep product codes as text, choose a records array and verify the exported XLSX workbook.

Open JSON to Excel Download practice file

Follow the example

  1. Download the sample JSON. Its Code values are strings: "0012" and "0034". Numeric JSON literals cannot represent leading zeros. For synthetic API test records, GUID Generator can create UUID v4 identifiers; keep them as quoted strings.
  2. Open JSON to Excel and choose the sample. Inspection starts automatically. Select the records array; for pasted data, use Inspect pasted JSON.
  3. Keep Code as text in column options. Choose JSON text cells for flat records, or a nested-data layout that matches your source. Preview merged data before creating the workbook.
  4. Download the XLSX and open it in Excel. Confirm two data rows, codes 0012 and 0034, and Amount values 42 and 17.

Before

[{"Name":"Sample A","Code":"0012","Amount":42},{"Name":"Sample B","Code":"0034","Amount":17}]

Expected result

Name       Code   Amount
Sample A   0012   42
Sample B   0034   17

Limitations

If the source already stores a code as the number 12, conversion cannot recover an unknown original width. Quote long identifiers at the source. Check nested arrays and selected column types before export.

Troubleshooting

Missing records usually mean the wrong array path was selected. A numeric code column can remove leading zeros; set it to text and convert again.

Privacy

These tools process your files locally in your browser. Files are not uploaded for conversion. Loading the site and downloading public samples still makes normal hosting requests.

Continue with a related tool

More sample files and download help