Navigated to blog › convert-excel-to-json
Back to Blog
excel-guides

Convert Excel to JSON for API Imports and Data Pipelines

March 13, 2026
11
By SplitForge Team

Quick Answer

REST APIs expect JSON. Excel files are binary .xlsx ZIP archives. Converting between them requires parsing the Excel XML, mapping column headers to JSON keys, and correctly typing each cell value — numbers as numbers, dates as ISO 8601 strings, booleans as true/false, and text as strings. Online converters upload your file to their servers. Python scripts require a development environment. Browser-based conversion using SheetJS handles all of this locally, with configurable output structure and correct data type mapping, without transmitting your data anywhere.

ProblemCauseFix
Numbers appear as strings ("price": "29.99")Cell stored as text type in Excel XMLFix source cells: Data → Text to Columns → Finish to reparse as numbers
Dates appear as integers ("date": 44930)Converter doesn't detect date number formatUse browser converter — applies ECMA-376 number format detection
Booleans appear as "TRUE" textCell type not read correctlyBrowser converter maps Excel boolean type to JSON true/false
Empty cells cause API validation errorsAbsent key vs null not handledConfigure empty cell handling: null, omit, or empty string
Floating-point artifacts (29.990000000000001)IEEE 754 precision in JSON serializationSet decimal precision in converter settings before export

What is Excel to JSON conversion? Excel to JSON conversion transforms tabular worksheet data — where row 1 is headers and subsequent rows are records — into a JSON array of objects, where each row becomes an object with keys derived from column header names.


Fast Fix (60 Seconds)

Need to convert an Excel file to JSON right now:

  1. Open Excel to JSON — no installation, no Python, no account
  2. Upload your Excel file
  3. Select the sheet to convert
  4. Choose your output format (array of objects, flat array, or nested)
  5. Download the JSON file

Tested against product catalog workbooks and financial data exports from Excel 2024 and Google Sheets, up to 500K rows and 50 columns, March 2026. Output JSON file size and conversion time vary by text density and number format complexity.


What Correct Excel to JSON Conversion Looks Like

Input — product catalog worksheet:

Product IDNamePriceLaunch DateActiveNotes
1001Widget A29.991/15/2026TRUEBest seller
1002Widget B49.992/3/2026FALSE(blank)

Output — what bad converters produce (every value a string):

[
  {"Product ID": "1001", "Price": "29.99", "Launch Date": "45672", "Active": "TRUE"},
  {"Product ID": "1002", "Price": "49.99", "Launch Date": "45690", "Active": "FALSE"}
]

Output — what correct type-aware conversion produces:

[
  {"product_id": 1001, "name": "Widget A", "price": 29.99, "launch_date": "2026-01-15", "active": true, "notes": "Best seller"},
  {"product_id": 1002, "name": "Widget B", "price": 49.99, "launch_date": "2026-02-03", "active": false, "notes": null}
]

Numbers as numbers. Dates as ISO strings. Booleans as true/false. Empty cells as null. Keys in snake_case. This is what APIs actually accept.


TL;DR: Manual Excel-to-JSON conversion loses data types — every value becomes a string, dates become serial numbers like 44930, and booleans become TRUE as text. Python with pandas converts correctly but requires a development environment, package installation, and writing code. Online converters (tableconvert.com, Cloudmersive) upload your file to their servers — a problem for workbooks containing financial data or PII. Browser-based conversion using SheetJS parses the Excel binary format directly, preserves data types, converts dates to ISO 8601, and supports multi-sheet output in a single JSON file. Use Excel to JSON for clean, type-correct JSON without code or upload.


Table of Contents


Your backend team is building a product catalog API. The product data lives in a 12,000-row Excel workbook — maintained by the merchandising team who will never use anything other than Excel. Every time the catalog updates, someone needs to convert it to JSON and POST it to the API endpoint.

You try copy-pasting into a JSON editor. Forty minutes later you have 200 rows manually typed. You try an online converter — it produces JSON but every number is a string: "price": "29.99" instead of "price": 29.99. Your API validation rejects it. You try another converter — it converts the date column to Excel serial numbers (44930) instead of ISO dates (2026-01-15). Your database rejects those too.

You write a Python script. It works — until it's run on a machine without pandas installed, or by someone who doesn't know how to run a Python script.

This is the Excel-to-JSON production problem. The conversion is technically straightforward but practically painful without the right tool.


Why Excel to JSON Conversion Is Tricky

Excel and JSON represent data fundamentally differently.

Data types: Excel cells have a type attribute stored in the sheet XML — n (number), s (shared string), b (boolean), d (date/time formula). Per the ECMA-376 Office Open XML specification §18.3.1, numeric cells can represent integers, decimals, currencies, percentages, and dates depending on the number format applied. A JSON converter must read both the cell type and the number format to determine whether 44930 should become 44930 (an integer), 29.99 (a decimal), or "2026-01-15" (a date).

Date serialization: Excel stores dates as serial numbers — days since January 1, 1900. The value 44930 means January 15, 2026. JSON has no native date type — dates are typically serialized as ISO 8601 strings ("2026-01-15") or Unix timestamps (1736899200). A converter that doesn't implement date detection passes serial numbers into the JSON output, which most APIs and databases reject.

Null vs blank: An empty Excel cell can mean different things: the value is unknown, the value is not applicable, or the row intentionally has no data for that column. JSON distinguishes between null (explicit absence of value), omitting the key entirely, and "" (empty string). The right behavior depends on your API's schema.

Key name sanitization: Column headers in Excel may contain spaces, special characters, or characters invalid as JSON keys in some contexts. "Product Name" needs to become "product_name" or "productName" or "Product Name" depending on your API's convention.


Methods That Seem Like They Should Work (But Don't)

Copy-paste into a JSON editor Manual, error-prone, and doesn't scale beyond a few dozen rows. Also doesn't handle data types — everything becomes a string.

Save as CSV, then parse CSV as JSON CSV strips all data type information — dates become strings like "1/15/2026," numbers with formatting become strings like "$29.99," and booleans become "TRUE" or "FALSE" text. The resulting JSON has the right structure but wrong types throughout.

Excel's "Export to JSON" (doesn't exist natively) Excel has no built-in JSON export. Searching for this feature wastes time. The closest native option is Power Automate integration, which requires a Microsoft 365 Business license and significant setup.

Online converter tools (tableconvert.com, cloudmersive.com) Upload your Excel file to their servers for conversion. For workbooks containing product pricing, financial data, customer records, or any PII, this creates data exposure risk. The file lives on their infrastructure during and potentially after processing.

Python with pandas pd.read_excel() + df.to_json(orient='records') is the correct technical approach — but requires Python installed, pandas and openpyxl packages installed, and the ability to write and run a script. Not viable for non-technical team members or one-off conversions.

Python with openpyxl Lower-level than pandas — reads cells directly and preserves more type information. Still requires Python and package installation. The date detection requires additional logic beyond the basic library calls.

How to tell if your conversion produced wrong data types: Numbers appearing as strings in the JSON output ("price": "29.99" with quotes around the number). Date columns showing as integers ("date": 44930 instead of "date": "2026-01-15"). Boolean columns showing as text ("active": "TRUE" instead of "active": true). Empty cells producing missing keys when your API expects null. Floating-point artifacts like 29.990000000000001 in numeric fields. in the JSON output ("price": "29.99"). Date columns showing as integers ("date": 44930). Boolean columns showing as text ("active": "TRUE"). Column keys with spaces causing JSON parsing issues in some environments. Empty cells causing API validation failures when the schema requires null rather than absent keys.


How to Convert Excel to JSON — Step by Step

Step 1: Upload your workbook

Open Excel to JSON. Upload your .xlsx or .xls file. The tool reads the workbook's sheet list immediately.

Step 2: Select your sheet

Choose which sheet to convert. If your workbook has multiple sheets you want to convert, select them all — the tool can output a single JSON file with one array per sheet, keyed by sheet name.

Step 3: Configure header row

By default, the tool treats row 1 as the header row (column names). If your sheet has a title in row 1 and headers in row 2, set the header row to 2. If you want to generate numbered keys instead of using headers (col_1, col_2, etc.), enable that option.

Step 4: Configure data type handling

Date format: Choose how dates are output — ISO 8601 string ("2026-01-15"), Unix timestamp (1736899200), or Excel serial number (44930). ISO 8601 is the right choice for most REST APIs.

Empty cells: Choose how blank cells are represented — null, omitted key, or empty string "". Match your API's schema requirements.

Key naming: Choose key format — original header name, snake_case, camelCase, or kebab-case. Most REST APIs use snake_case or camelCase.

Number precision: Choose decimal precision for floating-point numbers. Excel stores numbers as IEEE 754 doubles; JSON does too. Specify precision to avoid floating-point artifacts like 29.990000000000001.

Step 5: Preview and download

The preview shows the first 5 records as formatted JSON. Verify data types look correct — numbers are numbers, dates are strings, booleans are true/false. Download the JSON file when the preview looks right.


JSON Output Formats Explained

Array of objects (default, most common)

Each row becomes a JSON object. Column headers become keys. This is the format expected by most REST APIs and database bulk import endpoints.

[
  {"id": 1, "name": "Widget A", "price": 29.99, "active": true},
  {"id": 2, "name": "Widget B", "price": 49.99, "active": false}
]

Nested by sheet (multi-sheet workbooks)

Each sheet becomes a top-level key containing its array of records. Use this when converting multiple sheets and you want them in one file.

{
  "Products": [{"id": 1, "name": "Widget A"}],
  "Categories": [{"id": 1, "name": "Electronics"}]
}

Column arrays (less common)

Each column becomes an array of values under its key. Some data visualization libraries and analytics tools prefer this format.

{
  "id": [1, 2, 3],
  "name": ["Widget A", "Widget B", "Widget C"],
  "price": [29.99, 49.99, 9.99]
}

Data Type Handling

Per ECMA-376 §18.3.1.4, Excel cell types and their JSON equivalents:

Excel Cell TypeExcel ExampleJSON Output
Number (integer)4242
Number (decimal)29.9929.99
Number (date format)44930 (Jan 15 2026)"2026-01-15"
Number (percentage)0.150.15 or "15%" (configurable)
Shared string"Widget A""Widget A"
BooleanTRUEtrue
BooleanFALSEfalse
Formula (number result)=A1*B159.9859.98
Formula (string result)=CONCAT(A1," ",B1)"John Smith""John Smith"
Empty(blank cell)null or omitted (configurable)

Edge Cases in Excel to JSON Conversion

Merged cells Merged cells store their value in the top-left cell. All other cells in the merge are empty. In JSON output, merged header cells produce a column for the top-left and blank keys for the others. Unmerge cells before conversion or the output will have unnamed columns.

Cells with formulas The converter reads computed values, not formula strings. =SUM(A1:A10) becomes 55 in the JSON, not the formula text. This is correct for most use cases — APIs want data, not formulas.

Numbers stored as text Excel sometimes stores numbers as text (visible as left-aligned cells with a green corner triangle). These appear in the cell XML as shared strings, not numeric types. The converter treats them as strings: "price": "29.99" instead of "price": 29.99. To fix: select the column in Excel, use Data → Text to Columns → Finish to reparse as numbers before converting.

Dates before 1900 Excel's date serial system starts on January 1, 1900. Dates before 1900 are stored as strings in Excel (not as serial numbers) and are output as strings in the JSON. No conversion needed for pre-1900 dates — they pass through as-is.

The 1900 leap year bug Excel incorrectly treats 1900 as a leap year, adding an extra day (serial number 60 = February 29, 1900, which didn't exist). This off-by-one error affects dates between January 1, 1900 and February 28, 1900. The converter applies the Lotus 1-2-3 compatibility correction for these dates, matching Excel's behavior.

Unicode column headers Column headers with non-ASCII characters (accented letters, Chinese characters, Arabic, etc.) are valid JSON keys in Unicode JSON and are passed through as-is. Ensure your API or database accepts Unicode key names if using non-ASCII headers.


Performance Benchmarks

All tests run using SplitForge Excel to JSON, Chrome 132, Windows 11, Intel i5-12600KF, 64GB RAM, March 2026. Test files: product catalog workbooks with mixed data types (numbers, strings, dates, booleans).

File SizeRowsColumnsConversion Time
5MB50K152.1s
50MB500K1518.4s
150MB500K5041s

Output JSON file size is typically 2-4x larger than the input Excel file for typical business data (more characters needed to represent values as JSON text vs. binary cell storage).


Additional Resources

Standards:

Technical References:

FAQ

Yes. Select multiple sheets and choose "Nested by sheet" output format. Each sheet becomes a top-level key in the JSON object containing its array of records.

ISO 8601 string format by default ("2026-01-15"). Configurable to Unix timestamp or Excel serial number. ISO 8601 is the format accepted by virtually all REST APIs and databases.

Configurable: null, omitted key, or "". Most REST APIs prefer null for absent values. Check your API's schema documentation to determine which your endpoint expects.

Yes. Key naming convention is configurable — original header names, snake_case, camelCase, or kebab-case. The conversion is applied to all keys uniformly.

No. All processing happens in your browser using SheetJS and the File API. Your Excel file never leaves your machine. This makes the tool safe for product pricing data, financial workbooks, and any file containing confidential information.

No hard limit. The tool processes files using streaming where possible. Files up to 150MB have been tested successfully in Chrome 132 on a 32GB RAM machine. Very large files (500MB+) may require extended processing time.

Yes. Select multiple sheets in the sheet selector and choose the output format. All selected sheets are converted in a single operation and included in the downloaded JSON file.

Special characters in headers are handled according to the key naming convention you choose. If you select "original," special characters are passed through as-is. If you select snake_case, spaces and special characters are replaced with underscores.

Convert Your Excel Data to JSON Now

Correct data types — numbers as numbers, dates as ISO strings, booleans as true/false
Multi-sheet workbooks output as single JSON file with named arrays
Configurable key naming, date format, and null handling
Browser-based — financial and product data never leaves your computer

Continue Reading

More guides to help you work smarter with your data

ai-data-prep

AI-Ready Data Checklist: 10 Things to Verify Before Upload (2026)

Before uploading to ChatGPT, Claude, or a fine-tuning API, run through this 10-point checklist. UTF-8 encoding, clean headers, PII removed, size within limits.

Read More
ai-data-prep

Convert Excel to JSON for AI APIs and LLM Pipelines (2026)

AI APIs and LLM pipelines expect JSON, not spreadsheets. Fine-tuning needs JSONL; direct prompts take arrays. Convert locally — no upload, no conversion server.

Read More
ai-data-prep

Prepare Data for AI: The Complete Guide (Privacy-First, 2026)

How to prepare a CSV or Excel file for ChatGPT, Claude, or an AI API — encoding, PII, format, size, and privacy. The complete local-first prep workflow.

Read More