Blog
Wild & Free Tools

Excel to JSON: How Column Headers Become JSON Property Names

Last updated: March 1, 2026 5 min read

Table of Contents

  1. How Row 1 Becomes JSON Keys
  2. Best Practices for Header Names
  3. What Happens With Empty or Merged Headers
  4. Renaming Keys After Export
  5. Data Types: Numbers, Booleans, and Dates
  6. Frequently Asked Questions

When you convert an Excel spreadsheet to JSON, the column headers in row 1 become the property names (keys) in each JSON object. Understanding this mapping — and how to prepare your headers — makes the difference between clean, usable JSON and output that requires manual cleanup.

How Row 1 Column Headers Become JSON Property Names

The converter reads row 1 of your spreadsheet as the header row. Each column header becomes a key in every JSON object. Every subsequent row becomes one JSON object in the output array.

Example spreadsheet:

NameEmailScore
Alice[email protected]92
Bob[email protected]87

Output JSON:

[
  { "Name": "Alice", "Email": "[email protected]", "Score": 92 },
  { "Name": "Bob", "Email": "[email protected]", "Score": 87 }
]

The header names appear exactly as written — capitalization, spaces, and special characters are preserved in the output.

Best Practices for Column Header Names Before Converting

Clean header names in Excel produce clean JSON keys. Before converting, review your headers:

Sell Custom Apparel — We Handle Printing & Free Shipping

Empty Headers and Merged Cells: What to Expect

Empty header columns: If a column in row 1 has no header, the converter assigns a placeholder name like "__EMPTY" or "Column3" depending on the tool. These columns still appear in the JSON output.

Merged header cells: Excel allows merging cells in row 1 to create visual groupings. When merged cells are used as headers, only the leftmost cell contains the actual value — adjacent merged cells are empty. This creates the empty header issue above.

Fix: Unmerge all cells in row 1 before converting. Give each column a unique, descriptive name. This takes 2 minutes and produces much cleaner JSON.

Renaming JSON Keys After Export

If your Excel file uses verbose or inconsistent header names and you cannot change the source file, you can rename keys after exporting to JSON.

Using a text editor: For small files, find-and-replace works: replace "First Name": with "firstName": throughout the file.

Using JavaScript:

const data = require("./data.json");
const renamed = data.map(row => ({
  firstName: row["First Name"],
  email: row["Email Address"],
  score: row["Test Score"]
}));
console.log(JSON.stringify(renamed, null, 2));

This approach lets you normalize any header naming convention into whatever key format your code expects.

How the Converter Handles Data Types in Each Column

Beyond key names, the converter also auto-detects data types in each column:

If a number column contains a mix of numbers and text (like "N/A"), the entire column may be treated as strings. Keep columns consistent for the cleanest output.

Try It Free — No Signup Required

Runs 100% in your browser. No data is collected, stored, or sent anywhere.

Open Free Excel to JSON Converter

Frequently Asked Questions

How does the Excel to JSON converter handle column headers?

Row 1 of your spreadsheet is treated as the header row. Each column header becomes a property name (key) in every JSON object. Rows 2 onward each become one JSON object in the output array.

What happens if two columns have the same header in Excel?

Duplicate column headers cause only the last column's values to appear for that key in the JSON output. Rename duplicate columns before converting to preserve all data.

Can I convert Excel to JSON without using the first row as headers?

Most browser-based converters assume row 1 is always the header row. If your data has no headers, add a row of column names at the top before converting, then remove or ignore them after.

Why do my JSON keys have spaces in them after converting?

JSON keys preserve the exact text of your Excel column headers, including spaces. To get keys without spaces, rename your Excel column headers to use camelCase or underscores before converting: "FirstName" or "first_name" instead of "First Name".

David Rosenberg
David Rosenberg Technical Writer

David spent ten years as a software developer before shifting to technical writing. He covers developer productivity tools — JSON formatters, regex testers, timestamp converters — writing accurate, no-fluff documentation.

More articles by David →
Launch Your Own Clothing Brand — No Inventory, No Risk