In Excel: convert a worksheet to JSON by exporting the range with headers and mapping each data row to one object whose keys are the header cells — or use Power Query (Data ▸ Get Data ▸ From File ▸ From JSON) for the reverse direction.
2 records
What this does
JSON stores records as objects with named fields, while a worksheet stores them as rows under header cells. Converting between the two means deciding which row holds the field names and how empty cells should appear (empty string vs. missing key). Excel itself has no one-click "save as JSON"; Power Query imports JSON, but exporting requires a tool or script. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “excel convert json”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. The point is a data step that keeps your analysis trustworthy, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
A sheet has headers name and qty in row 1, with Bolt M8 / 42 in row 2 and Nut M8 / 120 in row 3. Converted with the first row as headers, the output is [{"name":"Bolt M8","qty":"42"},{"name":"Nut M8","qty":"120"}] — two records, keys taken from row 1. APIs, config files, and most web tooling speak JSON. Converting a worksheet to JSON lets spreadsheet data feed scripts and apps without manual re-typing. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. The short version of “excel convert json”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.
Common mistakes
- Merged header cells, which leave some columns without a key.
- Expecting Excel's Save As dialog to offer JSON — it does not; you need a converter or script.
- Forgetting that all cell values arrive as text; cast numbers in the consuming code.
- Using a sheet where the real headers start in row 3 — move them to row 1 first.
Frequently asked questions
Can Excel save a file as JSON directly?
No. Save As has no JSON option. Use a converter like the one above, Power Automate, or a script (Office Scripts, Python).
How do I open a JSON file in Excel?
Data ▸ Get Data ▸ From File ▸ From JSON, then expand the records into columns in Power Query and Close & Load.
Does the converter upload my spreadsheet?
No. The conversion runs entirely in your browser; the file never leaves your machine.