Excel to JSON Converter

Paste cells copied from Excel or Google Sheets. The first row becomes the JSON keys.

How the Excel to JSON converter works

When you copy a range in Excel or Google Sheets, the clipboard holds plain text: one line per row, with a tab between cells. Paste that text here and the converter turns it into a JSON array of objects. The first row supplies the keys, and every row after it becomes one object with a value for each key. All values are kept as trimmed strings.

Each line is split on tabs if it contains a tab, otherwise on commas, so simple comma-separated text works too. Blank lines are skipped, and a header cell left empty gets a positional name such as column2.

How to convert Excel to JSON

  1. In your spreadsheet, select the header row and the data rows below it, then copy (Ctrl+C or Cmd+C).
  2. Click the input box on this page and paste.
  3. Click Run. The JSON array appears in the output box, formatted with two-space indentation.
  4. Click Copy to take the JSON into your code, fixture or API request.

Worked examples

1. A product sheet copied from Excel

The pasted text (cells separated by tabs):

sku	name	price	in_stock
A-100	Desk lamp	24.99	TRUE
A-101	Monitor arm	89	FALSE

Output:

[
  {
    "sku": "A-100",
    "name": "Desk lamp",
    "price": "24.99",
    "in_stock": "TRUE"
  },
  {
    "sku": "A-101",
    "name": "Monitor arm",
    "price": "89",
    "in_stock": "FALSE"
  }
]

Prices and booleans arrive as strings. Excel copies what the cell displays, so a currency-formatted cell gives text like $24.99 and dates follow your locale's display format.

2. Empty headers, short rows and extra cells

id		notes
1	x
2	y	ok	extra

Output:

[
  {
    "id": "1",
    "column2": "x",
    "notes": ""
  },
  {
    "id": "2",
    "column2": "y",
    "notes": "ok"
  }
]

The blank second header became column2. Row 1 has no third cell, so notes is an empty string; row 2 has a fourth cell with no header, so extra is dropped.

3. Commas inside quoted CSV fields

Typed or exported CSV is split on every comma, quotes included:

city,country
"London, UK",GB

Output:

[
  {
    "city": "\"London",
    "country": "UK\""
  }
]

Copy from the spreadsheet itself so cells are tab-separated, or use the CSV to JSON converter, which understands quoted fields.

Things to check before using the JSON

Turning strings into numbers and booleans

Because every value arrives as text, a short mapping step after conversion gives you properly typed JSON. In JavaScript, using the product sheet above:

const typed = rows.map(r => ({
  ...r,
  price: Number(r.price),
  in_stock: r.in_stock === "TRUE"
}));

Keep identifiers such as ZIP codes, phone numbers and SKUs as strings, since converting them to numbers strips leading zeros.

Which spreadsheet tool to use

Use this converter for a quick Excel to JSON conversion of a pasted range: seed data, lookup tables, test fixtures or a request body. For saved .csv files with quoted fields, use CSV to JSON, or TSV to JSON for tab-separated exports. To go the other way and download a real .xlsx, use JSON to Excel. After converting, explore the array in the JSON viewer or derive a contract for it with the JSON Schema generator.

FAQ

Does the first row become the JSON keys?

Yes. The first non-blank row is the header. Each later row becomes one object whose keys are those header cells, trimmed of surrounding spaces.

How many columns can I convert?

As many as the header row has. Cells to the right of the last header are ignored, and missing cells at the end of a row become empty strings.

Why are my numbers and TRUE/FALSE values strings?

The clipboard carries text, and the converter keeps every cell as a string so nothing is guessed wrongly, such as a ZIP code losing its leading zero. Convert types in code afterwards, for example Number(row.price).

Does it open .xlsx files?

No. Select the cells in Excel, Google Sheets or LibreOffice, copy them and paste the text. The tool reads tab- or comma-separated text, not the binary workbook.

Why did a cell containing a comma split into two?

Rows without a tab are split on every comma, and quoted CSV fields are not recognised. Copy straight from the spreadsheet so the cells are tab-separated, or use the CSV to JSON converter for real CSV files.

Is my data uploaded anywhere?

No. Conversion runs entirely in your browser and the data never leaves the page.

CSV to JSON JSON to Table Excel to XML TSV to JSON JSON Viewer