Excel to JSON
Convert a selected worksheet into object arrays or row arrays
Excel to JSON — what it does
Convert a worksheet to JSON in either of the two shapes programs expect: an array of objects keyed by the header row, or plain two-dimensional row arrays. Object mode feeds APIs and front-end code; array mode preserves the grid for tools that want positions rather than names.
When this tool helps
- Handing spreadsheet reference data to a developer in the shape their code consumes.
- Bundling a lookup table into a web application as a static JSON asset.
- Moving worksheet data into a document database or a configuration file.
How to use it
- Choose the Excel file and the worksheet.
- Pick the output mode: objects from headers, or row arrays.
- Process the conversion.
- Download the JSON.
Accuracy, limits, and good practice
- Object mode needs a clean single header row; merged or two-row headers produce keys nobody wants.
- Header text becomes keys verbatim, spaces included — snake_case headers save bracket notation in code later.
- Check how dates look in the output before shipping: spreadsheet date handling is the usual source of surprises in JSON exports.
- Check a date column in the output before shipping it: spreadsheet dates are stored as serial numbers and can arrive as bare numbers rather than readable dates.
Frequently asked questions
Which mode should I choose?
Objects for APIs and application code, arrays when the consumer expects a grid or the sheet has no meaningful headers.
Are numbers typed as numbers?
Numeric cells export as JSON numbers and text as strings, following what the cell actually holds.
Can I convert several sheets at once?
One worksheet per pass; run each sheet you need and combine the files in your project.
What happens to empty cells?
They come through as empty values, so consuming code should handle a missing field rather than assuming every key is populated.
Related tools on this site
- Split CSV by Column — Create separate CSV files for each field value
- Excel Sheet Renamer — Rename worksheet tabs and export a new Excel workbook
- JSON Path Extractor — Extract nested values using dot paths, indexes, and wildcards
Everything above runs inside this page. Excel to JSON needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
Excel 轉 JSON能做什麼
把工作表轉成程式期待的兩種 JSON 形態之一:以標題列為鍵名的物件陣列,或單純的二維列陣列。物件模式餵 API 與前端程式;陣列模式保留網格,給以位置而非名稱取值的工具。
什麼時候用得上
- 把試算表的參考資料交給開發者,格式正好是程式要吃的形狀。
- 把對照表打包成靜態 JSON 資產放進網頁應用。
- 把工作表資料移入文件型資料庫或設定檔。
使用步驟
- 選擇 Excel 檔案與工作表。
- 選擇輸出模式:標題轉物件,或列陣列。
- 執行轉換。
- 下載 JSON。
精確度、限制與實務建議
- 物件模式需要乾淨的單列標題;合併儲存格或雙列標題會產出沒人想要的鍵名。
- 標題文字會原樣成為鍵名(含空格)——用 snake_case 標題可省去程式裡的中括號寫法。
- 交付前先確認日期在輸出中的樣子:試算表的日期處理是 JSON 匯出最常見的意外來源。
- 交付前請先看一眼輸出中的日期欄:試算表日期以序號儲存,可能會變成一串數字而不是可讀日期。
常見問題
該選哪種模式?
API 與應用程式碼選物件;使用端期待網格、或工作表沒有有意義標題時選陣列。
數字會輸出成數字型別嗎?
數值儲存格輸出為 JSON 數字、文字輸出為字串,依儲存格實際內容而定。
可以一次轉多個工作表嗎?
一次一個工作表;需要的表逐一執行,再在專案中合併檔案。
空白儲存格會怎樣?
會輸出成空值,因此使用端程式應處理欄位缺漏,而不是假設每個鍵都有值。
本站相關工具
- 依欄位拆分 CSV — 依指定欄位值建立多個 CSV 檔案
- Excel 工作表重新命名 — 重新命名工作表分頁並匯出新的 Excel 活頁簿
- JSON 路徑提取 — 使用點路徑、索引和萬用字元提取巢狀資料
以上步驟全部在這個頁面內完成,Excel 轉 JSON 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。