PrivateCSV

Convert Excel to JSON

Turn a worksheet into a JSON array, with dates as ISO strings.

Excel file (.xlsx, .xls, .ods)

  • Nothing is uploaded
  • Free
  • No sign-up

Guide

Excel to JSON: the complete guide

Last updated 2 min read

About this tool

PrivateCSV converts one sheet of an Excel workbook (.xlsx, .xlsm or .xls) or an OpenDocument spreadsheet (.ods) into JSON. With a header row you get an array of objects whose keys are the column names; without one, an array of arrays. Numbers and booleans keep their type, dates become ISO 8601 strings such as 2024-01-15, and formulas are exported as their calculated values. The workbook is opened in your browser and never uploaded.

How to check that your file is never uploaded

How to convert Excel to JSON

  1. Choose the workbook.
  2. Pick the sheet to convert if there is more than one.
  3. Leave “First row is a header” ticked to use the column names as keys. Untick “Pretty-print” for a smaller file.
  4. Click Convert to JSON and download the file.

Example

A sheet with a header row, converted to an array of objects.

orders.xlsx (Sheet1)
Order  | Date       | Total | Paid
A-1001 | 15/01/2024 | 24.9  | TRUE
A-1002 | 16/01/2024 | 49    | FALSE
orders.json
[
  { "Order": "A-1001", "Date": "2024-01-15", "Total": 24.9, "Paid": true },
  { "Order": "A-1002", "Date": "2024-01-16", "Total": 49, "Paid": false }
]

When you need it

Loading spreadsheet data into an app
Product lists, prices, store locations and translations are often maintained in a spreadsheet by people who don't write code. JSON is what web apps, APIs and document databases load.
Content and configuration
Let editors update a sheet, then export it to JSON for a website build, a mobile app or a test suite.
Feeding scripts and APIs
Turn a sheet into a request body or a fixture file without writing a parser for Excel.

How cells are converted

  • Numbers stay numbers, and TRUE/FALSE become true/false.
  • Dates become ISO 8601 strings: 2024-01-15, or 2024-01-15T13:45:00 when the cell has a time. No time zone is added; the value matches what the cell shows.
  • Formulas are exported as the value last calculated and saved in the file. They are not recalculated.
  • Empty cells become null, so every object has the same keys. Completely empty rows are skipped.
  • Header names are trimmed. Empty headers become column1, column2 and so on, and duplicates get a suffix (name, name_2) so no value overwrites another.

Supported workbook formats

.xlsx and .xlsm (Excel 2007 and later), the older .xls format (Excel 97-2003, limited to 65,536 rows and 256 columns per sheet), and .ods from LibreOffice and OpenOffice. Password-protected workbooks cannot be read; save an unprotected copy first.

Limits to know about

  • One sheet per conversion. Convert each sheet separately if you need several.
  • Only values are exported: formatting, colors, comments and charts are not. In merged cells, the value belongs to the top-left cell and the others are null.
  • The whole workbook is read into memory, so very large workbooks can be slow on phones.

Frequently asked questions

How do I convert an Excel sheet to JSON?

Choose the workbook, pick the sheet and click Convert to JSON. With the header option on you get an array of objects; with it off, an array of rows.

Can Excel save a file as JSON?

No. Excel can import JSON through Power Query, but it has no “Save as JSON” option. You need a script, an add-in or a converter like this one.

How are dates converted?

Excel stores dates as serial numbers and only formats them as dates for display. The converter turns them into ISO 8601 strings (2024-01-15, or 2024-01-15T13:45:00 with a time), which every programming language can parse.

Are formulas included?

Their results are. Each formula cell is exported as the value Excel last calculated and saved in the file; the formula itself is not.

Which file formats can I convert?

Excel .xlsx, .xlsm and .xls, and OpenDocument .ods spreadsheets.

Related tools

Go further

Your files never leave your device

PrivateCSV runs every tool inside your browser. No upload, no account, nothing to install.