FileToolsHub logo

By FileToolsHub · Published 2026-08-10 · Updated 2026-09-04 · Excel

Excel to JSON for API Fixtures (No One-Off Script)

Turn a stakeholder spreadsheet into an array of objects for mocks and seeds, then validate and format the JSON.

Open Excel to JSON →

Sample data still arrives as Excel. Writing a Node script for every sheet is how afternoons disappear.

Prep the sheet

One header row. No merged title cells above the table. Put the sheet you care about first in the workbook.

Convert

Upload on /tool/excel-to-json. Download the JSON. Run /tool/json-validator if parse errors show up, then /tool/json-formatter when humans need to read it.

CSV sources

If you only have CSV, convert with /tool/csv-to-excel first or use CSV→JSON on the /spreadsheet hub.

Shape the sheet so the JSON is usable

Each column name becomes a key. “First Name” and “first_name” will not match later, so rename headers to the keys your API already uses before you convert. One row must be one object. Totals, notes under the table, and a second table to the right all leak into the JSON as extra rows or empty fields. Delete them. Dates often arrive as Excel serial numbers or as locale strings — check one date in the output and convert it in the sheet if the API expects ISO dates. Numbers that should stay strings, such as postal codes with a leading zero, need to be text in Excel or they will lose the zero. Validate the file, then pretty-print it when a teammate has to read it. Commit the JSON fixture, not the workbook, unless the workbook is the source stakeholders will keep editing. Open the JSON and confirm the first object has the keys you expect and that the row count matches the sheet, minus the header. A mismatch usually means a blank row or a note under the table was included. Delete that row in Excel and convert again instead of hand-editing dozens of objects.

← All guides