JSON array splitter
Split a large JSON array into chunks of N items, or group it by top-level key; see the item count and byte size of each part, then copy or download them one by one.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
When off, each part is a bare comma-separated list without []
Nothing to output
Downloading all generates one Blob per part and triggers the downloads one after another — your browser may ask whether to allow multiple downloads
What this tool does
- Split a huge JSON array into chunks of N items so you can hand it to several people or import it in batches without a single giant file choking a tool.
- Group and export by field: orders by status, users by name, one file per group.
- Split a large config object by its top-level keys so each key can be committed or shipped separately.
- Before sharing data externally, split it and check the item count and size of each part so you never hand over the whole dataset at once.
Example
Input
[{"id": 1, "name": "A"}, {"id": 2, "name": "A"}, {"id": 3, "name": "B"}, {"id": 4, "name": "B"}, {"id": 5, "name": "C"}], 2 items per partOutput
Part 1 · 2 items · 78 bytes
[
{
"id": 1,
"name": "A"
},
{
"id": 2,
"name": "A"
}
]
Part 2 · 2 items · 78 bytes
[
{
"id": 3,
"name": "B"
},
{
"id": 4,
"name": "B"
}
]
Part 3 · 1 item · 40 bytes
[
{
"id": 5,
"name": "C"
}
]
3 parts · 5 items · 196 bytes in totalPretty printing and the outer [] wrapper are on by default, so every part is still a valid JSON array. Switch to "by top-level key" with the field name and you get three parts shaped {"A":[…]}, {"B":[…]}, {"C":[…]}; turning off "keep outer wrapper" emits bare comma-separated items instead.
Frequently asked questions
How many items should each part hold?
There is no universal answer — it depends on the downstream limit. Bulk API writes often use 100–1000 per request, a single spreadsheet is happiest below a few tens of thousands of rows, and email attachments need to be much smaller. The accepted range is 1 to 1,000,000 and the default is 100.
What if the array items are not objects when grouping by field?
You get "every array item must be an object to group by field". Grouping needs a field value to name each bucket, so the top level must be an array of objects. If the items are arrays or scalars, use "by item count" instead.
Does grouping lose data?
No. Grouping only buckets the items by field value and keeps each item exactly as it was; the only change is that items from the same group are adjacent. Groups appear in first-seen order, and items missing that field land in the "undefined" group.
Will the browser block "download all"?
Possibly. Downloading all generates one file per part and fires the downloads in sequence; browsers usually allow only one automatic download, so they ask whether to allow multiple downloads — say yes. With many parts it is safer to copy or download them one by one.
Does a large file freeze the page?
Splitting and counting run synchronously in the browser, which is fine for arrays from a few megabytes to a few tens of megabytes. Anything larger is better pre-processed with command-line tools such as jq or split. Nothing is uploaded — the data never leaves your machine.
Keywords:jsonsplitslicechunkgroup数组分割分组分批json slice