Someone hands you a spreadsheet — a product list, a config table, a set of translations, a batch of records — and you need it as JSON. Maybe you're seeding a database, mocking an API response, feeding a frontend, or driving a script. The data is right there in those rows and columns, but JSON and spreadsheets speak different languages, and copy-pasting cell by cell is not a plan.
This guide covers how to convert XLSX to JSON cleanly, what good output looks like, and how to do it in your browser without uploading the file or writing a parser yourself.
Why developers want JSON instead of XLSX
A spreadsheet is a grid. JSON is structured data with named keys, nesting, and explicit types. For anything programmatic, JSON wins because it maps directly onto the objects your code already uses.
Common situations where you need the conversion:
- Seeding a database or fixtures from a list someone maintains in Excel.
- Mocking API responses during frontend development.
- Configuration that a non-developer edits in a spreadsheet but the app reads as JSON.
- Translations and content managed in sheets, consumed by code.
- Data migration between systems that don't share a format.
The goal is almost always the same: take each row and turn it into an object whose keys come from the header row.
What good XLSX-to-JSON output looks like
Say your sheet has headers id, name, and price, and three rows of data. The natural, useful JSON is an array of objects:
[
{ "id": 1, "name": "Notebook", "price": 4.50 },
{ "id": 2, "name": "Pen", "price": 1.20 },
{ "id": 3, "name": "Eraser", "price": 0.80 }
]
Each row becomes one object. The header row becomes the keys. This "array of objects" shape is what most APIs, ORMs, and frontend frameworks expect, so it's the default you should aim for.
A few things separate clean output from messy output:
- Headers as keys. The first row should drive the property names. Watch for duplicate or blank headers — they create collisions and weird keys.
- Correct types. A price should be a number (
4.50), not a string ("4.50"). Dates and booleans are the usual trouble spots; decide early whether you want them typed or left as strings. - Trimmed data. Trailing empty rows and stray columns from Excel can produce
null-filled objects. Clean the sheet first.
The pitfalls to watch for
Empty cells
A blank cell can become null, an empty string "", or be omitted entirely — and which one you get matters to the code consuming the JSON. Know how your converter treats blanks, and normalize on the receiving end if needed.
Number and date formatting
Excel stores dates as serial numbers under the hood and applies display formatting on top. A cell that reads 2026-06-28 might convert to a raw serial number like 46201 if the converter doesn't interpret the format. Check date columns specifically after converting.
Leading zeros and IDs
If your IDs include leading zeros (007) or are long enough that Excel switched them to scientific notation, the JSON inherits that. Format such columns as text in the spreadsheet before converting so the digits survive.
Multiple sheets
JSON from a single conversion usually represents one sheet. If your workbook has several tabs, convert each one separately, or decide which sheet is the source of truth before you start.
How to convert XLSX to JSON with Toolmingo
You don't need to install a library or run a script. Toolmingo does it in the browser, for free, with no upload — your file is processed on your own machine and never sent to a server.
- Open the Spreadsheet Converter.
- Drop in your
.xlsx(or.xls) file. - Select the sheet you want if the workbook has more than one.
- Choose JSON as the output format.
- Convert and copy or download the result.
Because the work happens locally, this is safe for internal product catalogs, customer data, or anything you wouldn't want sitting on someone else's server. There's no sign-up and no upload step.
Once you have JSON, you might want it as YAML for a config file or XML for a legacy system. The Data Converter takes JSON and instantly turns it into YAML or XML (and back), so you can move between data formats without touching the spreadsheet again. Pairing the two tools — Spreadsheet Converter to get out of Excel, Data Converter to reshape from there — covers almost any "I have it in X, I need it in Y" situation.
A practical workflow
- Clean the sheet: remove blank trailing rows, fix headers, format ID/date columns as text where needed.
- Convert XLSX to JSON in the Spreadsheet Converter.
- Eyeball the first and last few objects to confirm types and keys look right.
- If you need a different serialization, pass the JSON through the Data Converter.
Five minutes of prep on the spreadsheet side saves you debugging malformed objects later.
FAQ
How is the JSON structured — one object or an array?
The standard, most useful output is an array of objects, where each spreadsheet row becomes an object and the header row supplies the keys. That shape drops straight into most APIs, databases, and frontend frameworks without reshaping.
Why are my numbers showing up as strings in the JSON?
This usually happens when cells are stored or formatted as text in Excel, so the converter preserves them as text to avoid losing information. Format the columns as numbers in the spreadsheet before converting, or cast the values in your code after import.
Can I convert a spreadsheet to JSON without uploading it anywhere?
Yes. Toolmingo's Spreadsheet Converter runs entirely in your browser, so the file is never uploaded. That makes it suitable for sensitive datasets where sending the file to a third-party server isn't acceptable.