Why turn a spreadsheet into JSON?
Spreadsheets are where people keep lists, but code prefers JSON. A product catalogue, a list of stores, a set of translations or a table of prices is often maintained in Excel by someone who is not a developer, and then needs to reach a website, an app or an API. JSON is the format all of those read natively.
JSON also carries more meaning than CSV. In a CSV every value is just text, and the program reading it must guess whether 42 is a number and whether “TRUE” is a yes. In JSON, numbers, true/false values, text and empty values each have their own type, and every value sits next to the name of its column. Nothing has to be guessed on the other side.
Converting Excel to JSON without a tool
Excel has no Save As › JSON option, so the usual routes all need some setup.
Power Query
Data › Get Data › From File › From JSON reads JSON into Excel, but Power Query only imports data. It cannot write a JSON file, so it does not help in this direction.
Office Scripts
In Excel for the web, with a Microsoft 365 business or education account, the Automate tab runs Office Scripts written in TypeScript. A short script can read the sheet with workbook.getActiveWorksheet().getUsedRange().getValues(), pair each row with the header row and pass the result to JSON.stringify. You then have to copy the output from the console, and dates arrive as Excel serial numbers such as 45366 unless you convert them yourself.
A VBA macro
On the Windows desktop app, a macro can loop over the cells and build the JSON text. VBA has no built-in JSON support, so you need to escape quotes, backslashes and line breaks by hand, decide how to write dates, and save the workbook as .xlsm to keep the macro.
Formulas
Some guides build each row with TEXTJOIN and string concatenation, then copy the column into a text file. It works for simple lists, but a single quote mark or line break inside a cell produces invalid JSON, and numbers formatted as text end up quoted.
Where this converter helps
Seeding a database or web app. Load starter data, such as a list of cities or product categories, straight from the sheet your team already maintains.
Sending data to an API. Many APIs accept an array of records in a request body. Convert the sheet and paste or post the result.
Content for static sites. Static site generators and front-end frameworks can import a JSON file at build time, so a catalogue or price list edited in Excel becomes site content without a database.
Settings and translations. Non-developers can edit labels, prices or text strings in a familiar spreadsheet, and developers receive a file they can commit.
Test data. Build realistic fixtures in a sheet, including empty cells and edge cases, and export them for automated tests.
Private data. Many online converters upload your file to a server. This one runs entirely in your browser, so customer lists and sales figures never leave your device.
How the conversion works
- One object per row. The header row supplies the property names, and the order of the columns is kept.
- Types are kept. Numbers stay numbers, TRUE and FALSE become
trueandfalse, and text stays text, so a code such as “000123” keeps its zeros. - Dates become text. Each date is written as “YYYY-MM-DD”, with the time when the cell has one.
- Empty cells become null. Every object has the same keys, which makes the data easier to load into typed code or a database table.
- Safe property names. Blank headers are named by column letter and repeated ones are numbered.
- Readable output. The file is UTF-8, indented with two spaces and named after your original file, for example customers-sample-cleaned.json.
The preview shows the result as a table before you download, and the summary reads something like “Converted 5 rows and 6 columns from Excel (.xlsx) to JSON.”
Tips for clean output
Make sure the header row is the first row of the table. A title row or merged heading above it turns into a property name, so the Fix Excel columns tool is worth running first on reports exported from other systems. Short, consistent headers such as “email” or “joinedOn” are easier to use in code than long labels with spaces.
Blank rows at the end of a sheet become objects full of nulls. Remove them with the Remove blank rows tool before converting. To go back the other way, the JSON to Excel converter turns an array of records into a workbook.