Convert public Google Sheets into structured JSON.
bigsheet-to-json reads one or more worksheets from a Google Sheet URL and converts rows into arrays of objects using the first row as headers.
No browser automation. No Playwright. No authentication required for public sheets.
- Convert Google Sheets → JSON
- Read specific worksheets
- Auto-read all worksheets
- Use first row as object keys
- Trim header names
- Convert headers to camelCase
- Remove empty columns
- Remove empty rows
- Parse numbers automatically
- Parse dates automatically
- Configurable error handling
npm install bigsheet-to-jsonconst { parseSheet } =
require(
"bigsheet-to-json"
);
(async () => {
const data =
await parseSheet({
url:
"https://docs.google.com/spreadsheets/d/XXXXX/edit",
tabs: [
"Sheet1",
],
});
console.log(data);
})();Spreadsheet:
| Student Name | Gender | Grade |
|---|---|---|
| Alexandra | Female | 4 |
| Andrew | Male | 1 |
Output:
{
"Sheet1": [
{
"Student Name": "Alexandra",
"Gender": "Female",
"Grade": 4
},
{
"Student Name": "Andrew",
"Gender": "Male",
"Grade": 1
}
]
}Returns:
Promise<Object>| Property | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Google Sheet URL |
| tabs | string[] | No | Worksheets to read |
| options | object | No | Parsing options |
Remove leading/trailing spaces from headers.
Default:
trueExample:
" Student Name "
↓
"Student Name"
Convert headers into camelCase.
Default:
falseExample:
Student Name
↓
studentName
Remove properties with empty values.
Default:
trueExample:
Before:
{
"name": "John",
"email": ""
}After:
{
"name": "John"
}Remove rows with no values.
Default:
trueConvert numeric strings into numbers.
Default:
trueExample:
Before:
{
"price": "100"
}After:
{
"price": 100
}Convert detected dates into JavaScript Date.
Default:
trueExample:
Before:
{
"createdAt": "2026-05-22"
}After:
{
createdAt:
Date(...)
}Behavior when worksheet parsing fails.
Options:
"skip"
"throw"Default:
"skip"Example:
onError: "throw"const data =
await parseSheet({
url,
tabs: [
"Students",
"Teachers",
],
});Output:
{
"Students": [],
"Teachers": []
}Omit tabs.
const data =
await parseSheet({
url,
});All worksheets will be parsed.
const {
parseSheet,
} =
require(
"bigsheet-to-json"
);
(async () => {
const data =
await parseSheet({
url:
"https://docs.google.com/spreadsheets/d/XXXXX/edit",
options: {
trimHeaders:
true,
camelCaseHeaders:
true,
dropEmptyColumns:
true,
dropEmptyRows:
true,
parseNumbers:
true,
parseDates:
true,
onError:
"skip",
},
});
console.log(
JSON.stringify(
data,
null,
2
)
);
})();Example output:
{
"students": [
{
"studentName": "Alexandra",
"grade": 4
}
]
}- Node.js 18+
This package supports:
- Public Google Sheets
- Sheets shared with Anyone with the link
Private sheets require custom authentication.
MIT