XLSX to JSON

Turn a spreadsheet into JSON for an app or a test fixture. The header row becomes the keys, and numbers stay numbers.

Options
Options
All sheets: one CSV per sheet in a zip, or one JSON object per sheet. A number picks just that sheet (1 = the first tab).
On: every row becomes an object keyed by the column names. Off: every row becomes a plain list.

Your file is converted on your computer. It is not uploaded anywhere.

How it works

  1. Drop your file in the box above, or click it to pick one.
  2. Pick the output format and press Convert.
  3. Download the result. Nothing was uploaded on the way.

Is it safe?

Seed data and fixtures have a way of starting life as a copy of real customer rows. The workbook is converted by the browser on your machine, so none of it is uploaded.

Want to check? Open your browser DevTools, switch to the Network tab and convert a file. Or convert a small file once, because each converter downloads its code the first time, then go offline and convert your real file.

The shape you get

With "First row holds the column names" on (the default), a sheet becomes an array of objects:

[{ "Name": "Ada", "Joined": "2024-03-01", "Active": true, "Score": 91.5 }]

Switch it off and every row is a plain array, header included:

[["Name", "Joined"], ["Ada", "2024-03-01"]]

A workbook with several sheets becomes one object keyed by sheet name, each holding its rows:

{ "Customers": [ ... ], "Orders": [ ... ] }

Set "Sheet to convert (0 = all sheets)" to a number and you get just that sheet as a plain array. The file is pretty-printed with two-space indents, so it's readable in a diff.

How values are typed

  • Numbers are JSON numbers, TRUE/FALSE are JSON booleans, and empty cells are null.
  • Dates become ISO strings: "2024-03-01", or "2024-03-01 14:30:00" when there's a time. JSON has no date type, and ISO is what every language parses.
  • Formulas are replaced by their last calculated value.
  • Error cells come through as their text, like "#N/A".

Header quirks it sorts out

Real spreadsheets have messy headers. Two columns both called "Total" become Total and Total_2, so no value is overwritten. A blank header becomes column_3 (by position). Empty rows above the header are skipped. A blank row in the middle of the data is kept, as an object full of nulls, so row positions still line up with the sheet.

Why people need this

The data lives in Excel because that's where the people who maintain it work: price lists, translations, product catalogues, config tables. The code wants JSON. Writing a parser for a one-off import is overkill, and pasting into an online converter means sending the data somewhere. Here it stays in the browser. Input can be .xlsx, .xlsm, .xlsb, .xls or .ods, up to 100 MB.

Questions about this format

Why are my dates strings and not numbers?

Excel stores dates as day counts since 1900, which means nothing outside Excel. The converter turns cells with a date format into ISO text like 2024-03-01, which any language can parse.

Can I get one JSON file per sheet?

Convert once per sheet with "Sheet to convert" set to 1, 2, 3 and so on. With 0 you get a single file holding all sheets, keyed by name.

Are hidden sheets and columns included?

Yes. Hidden is a display setting, and the data is still in the file, so it's exported like everything else. Delete what you don't want before converting.

Can it write nested JSON from column names like address.city?

No, the output is flat: "address.city" stays a key with a dot in it. Nesting would need rules about your data that a spreadsheet doesn't carry.

Last updated: