Sheets to JSON / Export guide

How to export Google Sheets to JSON

A complete example, from spreadsheet headers to a downloaded JSON file. Includes nested objects, arrays, and the settings that change your output.

Start with a small spreadsheet

To export with the Sheets to JSON add-on, put field names in the first row and a record on each row below. Open the sidebar, choose an output format, preview the result, and download the JSON file.

  1. Install Sheets to JSON from Google Workspace Marketplace. The add-on uses a one-time $7 license.
  2. Download the sample CSV. In a new Google Sheet, use File → Import → Upload to import it, or enter the table below yourself.
  3. Select the tab to export. Open the add-on from Extensions → Sheets to JSON.
  4. Choose Array of Objects and enable Infer data types for the sample.
  5. Check the preview against the expected output below, then download the .json file.

This produces a file at the time of export. If you change the sheet afterward, export again to update your JSON.

Example: export a product catalog as JSON

Each row becomes an object. A dot in a header creates a nested object; numbered brackets create an array.

Input: two products in Google Sheets
namepricecategory.nametags[0]tags[1]inStock
Notebook12Stationerypaperdesktrue
Pen3Stationeryinkdeskfalse

Choose Array of Objects and enable Infer data types for this output:

[
  {
    "name": "Notebook",
    "price": 12,
    "category": {
      "name": "Stationery"
    },
    "tags": [
      "paper",
      "desk"
    ],
    "inStock": true
  },
  {
    "name": "Pen",
    "price": 3,
    "category": {
      "name": "Stationery"
    },
    "tags": [
      "ink",
      "desk"
    ],
    "inStock": false
  }
]

Download the sample spreadsheet (.csv) and import it into Google Sheets to follow along.

Notice that price is a number and inStock is a boolean. The two product rows become two objects inside one outer array.

Choose an output format

Array of Objects: named fields for each record

Use this for product catalogs, contact lists, configuration records, and test data. The first row supplies the keys; every data row becomes an object.

A sheet with name and price columns produces:

[
  {
    "name": "Notebook",
    "price": 12
  },
  {
    "name": "Pen",
    "price": 3
  }
]

Array of Arrays: preserve the row-and-column layout

Use this when the receiving program expects values by column position. The output includes the header row as the first array.

[
  [
    "name",
    "price"
  ],
  [
    "Notebook",
    12
  ],
  [
    "Pen",
    3
  ]
]

Use Array of Objects when you want dotted or bracketed headers to describe a nested record.

Create nested JSON with column headers

In Array of Objects mode, the header describes where each cell belongs in the output.

HeaderCell valueStructure
address.cityKochicity inside address
address.geo.lat9.93lat inside address.geo
tags[0]paperFirst item in tags
tags[1]deskSecond item in tags
items[0].nameNotebookname in the first items object

Arrays of objects

Combine brackets and dots to put several line items inside a single record. In one spreadsheet row, enter Notebook under items[0].name, 2 under items[0].quantity, Pen under items[1].name, and 1 under items[1].quantity.

[
  {
    "items": [
      {
        "name": "Notebook",
        "quantity": 2
      },
      {
        "name": "Pen",
        "quantity": 1
      }
    ]
  }
]

Array indices start at zero. Keep each complete record on one row; this example does not join or group separate spreadsheet rows into one order.

Control numbers, booleans, dates, and text

Infer data types converts recognized values to numbers, booleans, and dates. Disable it when you need values to remain strings, and inspect the preview before using the export.

Cell valueWith inference enabledJSON type
1212number
3.53.5number
truetrueboolean
2024-01-15ISO-formatted date textstring
(empty cell)nullnull

JSON has no native date type. Review the exported date string and timezone against what your application expects, especially when the spreadsheet uses a different locale.

Preserve leading zeros in IDs and postal codes

Format these cells as plain text in Google Sheets before entering or importing values such as 00123, and disable type inference for the export. If Sheets has already changed the value to 123, turning inference off cannot restore the missing zeros.

Before you export

  • Use a single header row with distinct, non-empty field names.
  • Keep one record per row, with consistent types in each column.
  • Use dots and brackets only when you intend to create a nested structure.
  • Check the active tab, output format, and type inference setting.
  • Preview a small sample first, including an empty cell, a date, and any identifiers your app relies on.

Fix common export problems

My numbers or booleans are strings

Enable Infer data types and regenerate the preview. Check that the underlying values are simple numbers or booleans; review formatted amounts and mixed text before importing them into your app.

My output has rows instead of named objects

Choose Array of Objects. Array of Arrays intentionally keeps the row-and-column layout, including the headers.

My nested fields look wrong

Check the header spelling and start array indices at [0]. Avoid defining both a value such as address and a nested path such as address.city in the same record.

My export contains the wrong sheet or old data

Select the intended tab and export again. The add-on exports the active sheet; a previously downloaded file does not update when you edit the spreadsheet.

My text contains quotes or line breaks

Keep the original text in the cell instead of manually adding JSON escape characters. In JSON output, escaped quotes and newlines are normal; open the file with a JSON parser to inspect the resulting value.

A large sheet is slow to preview

Try a smaller copy of the data first. Conversion runs in the browser, so the time and practical size limit depend on the sheet and your device.

Choose between a file export and a live API

  • Use this add-on for a downloaded JSON snapshot, especially when you need nested objects or arrays without writing code.
  • Use a spreadsheet formula for a small text transformation you can maintain yourself. If you assemble JSON text manually, account for quotes, line breaks, and empty values.
  • Use Apps Script when you need custom transformations or a repeatable process beyond the add-on’s formats. Google’s Apps Script spreadsheet guide is a starting point.
  • Use the Google Sheets API when your app needs to read current spreadsheet data. It is a separate integration with its own access setup; see the Google Sheets API overview.

The add-on downloads a file; it does not publish a JSON endpoint or synchronize your application with the sheet.

Common questions

Can I convert an Excel spreadsheet to JSON?

Import the Excel file into Google Sheets first, then use the add-on on the imported sheet. Check headers and cell types after importing.

Can I export every tab at once?

Each export uses the active sheet. Switch tabs and download them separately.

Where is my spreadsheet data processed?

Conversion runs locally in the Google Sheets environment. Sheets to JSON does not collect or store spreadsheet content; your email address is used for license verification. Read the privacy policy for details.

How do I get help with an export?

Email hey@kiranjohns.com with the output format, header names, and a small anonymized example of the expected and actual JSON.

Get Sheets to JSON or return to the converter overview.