Excel to JSON Converter

Convert XLSX, XLS, ODS and CSV files to JSON right in your browser. Pick a sheet, configure options, then copy or download. Files are never uploaded.

Drop your Excel or CSV file here

or

Supports .xlsx · .xls · .ods · .csv

🔒 Private: Your file is read locally and never uploaded or stored. Works offline once the page loads.

What does Excel to JSON do?

Excel to JSON conversion turns spreadsheet data into a machine-readable format that developers, data engineers and analysts use to feed APIs, databases, scripts and configuration files. This tool reads your spreadsheet entirely on-device using the SheetJS library, so your data never leaves your computer.

Output format guide

ModeWhen to useExample output
Array of objects REST APIs, databases, most data processing [{"Name":"Alice","Score":95}]
Array of arrays Grid-based processing, spreadsheet mirrors [["Name","Score"],["Alice",95]]
Minified Embedding JSON in code or payloads No whitespace, smallest file size
Indented 2/4 spaces Readability, version control diffs Pretty-printed, one key per line

Spreadsheet formats: what's actually inside XLSX, XLS, ODS and CSV

The four formats this tool reads look interchangeable in a file picker but are built very differently under the hood, which is why a library like SheetJS is needed to read them all:

FormatWhat it is
.xlsxOffice Open XML (standardised as ECMA-376 / ISO/IEC 29500). Despite the single icon, an XLSX file is actually a ZIP archive of XML documents — one part per sheet, plus shared strings, styles and relationships. Rename a copy to .zip and you can open it to see the parts.
.xlsThe legacy Excel 97–2003 format, a proprietary binary structure called BIFF (Binary Interchange File Format). It is not XML and not human-readable; it has to be decoded record by record.
.odsOpenDocument Spreadsheet (ISO/IEC 26300), the format used by LibreOffice and exportable from Google Sheets. Like XLSX it is a ZIP of XML, but following the open OpenDocument schema rather than Microsoft's.
.csvComma-Separated Values (loosely standardised by RFC 4180). The simplest possible format — plain text, one row per line, fields separated by commas — but with no notion of types, sheets, formulas or formatting. It is just the grid.

Because XLSX, XLS and ODS each store far more than raw cells — formulas, number formats, multiple sheets, styles — converting to JSON means deciding what to keep. This tool keeps the computed cell values (the result of a formula, not the formula text) and discards styling, which is exactly what you want when the goal is to feed the data into code.

Why JSON?

JSON (JavaScript Object Notation) was specified by Douglas Crockford in the early 2000s and is now the lingua franca for moving structured data between systems. It is standardised as ECMA-404 and IETF RFC 8259, and although it grew out of JavaScript's object syntax, it is completely language-independent — every major programming language can read and write it. Its appeal is that it maps cleanly onto the data structures programs already use: objects (key/value pairs), arrays (ordered lists), and a small set of primitive types — string, number, boolean and null.

A spreadsheet is, conceptually, a grid of values with a header row, which converts naturally into JSON's "array of objects" shape — each row an object keyed by the column headers. That is why JSON is the format of choice for sending spreadsheet data to a REST API, seeding a database, driving a chart or template, or storing configuration. One thing JSON deliberately lacks, though, is a date type and any concept of comments — which leads directly to the conversion gotchas below.

The gotchas: dates, numbers and types

Most surprises in a spreadsheet-to-JSON conversion come from the fact that Excel stores values very differently from how it displays them. Watch for these:

  • Dates are really numbers. Excel stores a date as a serial number — a count of days since an epoch of (effectively) 30 December 1899 — and only the cell's format makes it look like a date. So a cell showing "15/03/2024" may convert to a bare number like 45366. There is even a famous quirk: Excel deliberately treats 1900 as a leap year (it isn't — a bug inherited from Lotus 1-2-3 in the 1980s for file compatibility), so every serial date after 28 February 1900 is one day "off" from a naïve calculation. If your dates come out as numbers, format the source column as text first, or post-process the JSON to convert serials back to ISO dates.
  • Leading zeros vanish. A PIN code or account number like 007890 becomes 7890 if Excel stored it as a number. Format such columns as text in the spreadsheet before converting to preserve the zeros.
  • Big numbers lose precision. JSON numbers (and JavaScript) use 64-bit floating point, which is exact only up to about 15–16 significant digits. A 16-digit card number or a long ID stored as a number can be rounded; keep those as text.
  • Scientific notation. A long numeric string Excel decided was a number may appear as 1.23457E+14. Again, the fix is to store the column as text so it is treated as a label, not a quantity.

The rule of thumb: anything that is an identifier rather than a quantity — IDs, codes, phone numbers, postcodes — should be stored as text in the spreadsheet before conversion, so it survives the trip as a faithful string.

CSV pitfalls: delimiters, quoting and encoding

CSV's simplicity hides a few traps that XLSX avoids by being structured:

  • Commas inside values. A field like Mumbai, Maharashtra contains the delimiter itself. RFC 4180 handles this by wrapping such fields in double quotes ("Mumbai, Maharashtra"), and a quote inside a quoted field is doubled (""). A parser that just splits on commas will break on this — proper CSV parsing respects the quoting, which is why pasting CSV into a naïve splitter often mangles addresses.
  • The delimiter isn't always a comma. In regions where the comma is the decimal separator (much of Europe), spreadsheets often export with a semicolon delimiter instead. If a CSV converts to a single fat column, the wrong delimiter is usually why.
  • Character encoding. CSV carries no encoding declaration, so non-ASCII text (₹, accents, names in Indian scripts) only survives if the file is saved as UTF-8. A leading byte-order mark (BOM) sometimes appears as stray characters at the start of the first cell. Saving from Excel as "CSV UTF-8" avoids most of this.

For data that contains commas, quotes, line breaks or non-English text, an XLSX or ODS file is far more robust than CSV, because the structure is explicit rather than inferred from punctuation.

From spreadsheet to API or database: a workflow

Converting to JSON is usually one step in a larger task. A dependable pattern looks like this:

  1. Clean the sheet first. Put a single, tidy header row at the top; remove merged cells, blank spacer rows and decorative columns; and format ID-style columns as text so they don't lose precision or leading zeros.
  2. Choose the output shape. Use array of objects with "first row as headers" on for almost anything that consumes named fields — APIs, databases, templates. Use array of arrays when you need to preserve the exact grid.
  3. Pick the indentation. Pretty-printed (2 or 4 spaces) is best for reading and for clean version-control diffs; minified is best for embedding the JSON in code or sending it as a compact payload.
  4. Validate before you ship it. Paste the result into a JSON formatter and validator to confirm it parses, or into JSON to TypeScript to generate type definitions for the data you're about to import.

Because every step here runs in your browser, you can do all of this with confidential data — salary sheets, customer lists, exam records — without it ever leaving your machine.

Frequently asked questions

Is my Excel file uploaded anywhere?
No. This converter runs entirely in your browser using the SheetJS library. Your file is read directly from your local disk into memory and never sent to any server. Close the tab and it is gone — nothing is stored.
What file formats are supported?
The converter accepts .xlsx (Excel 2007+), .xls (Excel 97–2003), .ods (LibreOffice / Google Sheets export), and .csv files. For CSV files the sheet selector is hidden because there is only one sheet. Macro-enabled workbooks (.xlsm) are accepted but macros are not executed — only data is read.
What is the difference between "Array of objects" and "Array of arrays"?
Array of objects (the default when "First row as headers" is on) produces JSON like [{"Name":"Alice","Score":95},{"Name":"Bob","Score":87}] — each row becomes an object keyed by the header row. Array of arrays produces [["Name","Score"],["Alice",95],["Bob",87]] — every row, including the header, is a plain array. Use array-of-objects when you need named fields (e.g. feeding a REST API or database). Use array-of-arrays when you want to keep the raw grid structure.
What happens to empty cells?
In array-of-objects mode, cells that are completely empty are omitted from the object (the key will not appear rather than being null). In array-of-arrays mode, empty cells become null. You can post-process the JSON to replace missing keys with null or a default value if your downstream code needs them.
How large a file can I convert?
There is no hard server-side limit because everything happens in your browser. In practice, most modern browsers can comfortably handle Excel files up to 10–50 MB. Very large files (hundreds of thousands of rows) may take a few seconds and use significant memory. If your browser tab crashes, try splitting the file into smaller chunks first.
Can I convert a specific sheet from a multi-sheet workbook?
Yes. When you load a workbook with more than one sheet, a sheet selector dropdown appears. Choose any sheet by name and the JSON output updates immediately. The Download button always downloads the currently selected sheet.

Jelajahi alat lainnya

Lihat semua 70 alat →