List Chunker
Split a list into chunks by size, by number of chunks or by a character limit, as lines, JSON, CSV or SQL values — for paging API requests or bulk inserts.
Enter a list above to split it into fixed-size chunks.
Split a list into fixed-size chunks
Paste a list with one item per line — or pick a comma, semicolon, tab, space or your own separator under "Item separator" — set a chunk size, and the items are grouped into batches of that size, the last batch holding whatever is left over. "Split by" can instead take a number of chunks, made as even as they can be, or a maximum number of characters per chunk, and "Output format" writes each chunk as text lines, a JSON array, a comma-separated row or SQL values ready for IN (…). Optionally trim each line and drop blank lines so stray whitespace and empty rows do not throw off the counts. As soon as the box holds anything, "Items in the list" says how many items it has, even before a chunk size is set. Everything runs in your browser, so your list is never uploaded.
Why batch a list
Many APIs cap how many IDs, rows, or records you can send per request. Chunking a long list into fixed-size groups lets you page through it one request at a time, build bulk-insert statements, or paste manageable batches into a spreadsheet or form. Each chunk has its own copy button and its own download button for exactly that, saving the chunk as a text file named from "File name for each chunk" — or, left empty, from the opened file or "chunks" — with the chunk number on the end. Tick "Put a numbered heading above each chunk in the copy and download" and the whole-result copy and download put a numbered heading line above every chunk, so the batches can still be told apart in a single file. What goes between the chunks in that copy and download is set by “Between chunks in the copy and download”: “Default gap” (a blank line between chunks of lines, a line break in the other formats), “Line break only”, “A --- line”, or “A line of my own…”, typed into “Line between chunks”. How the list is split and written out — the mode and its number, the separator, the format, trimming, blank lines, headings and the gap — is remembered on this device for next time, until you press Forget saved settings; the list itself and the per-chunk file name are not.
Frequently asked questions
What happens to the last chunk if the list does not divide evenly?
The final chunk holds the remaining items. A list of 10 items split by 3 gives chunks of 3, 3, 3 and 1.
Does it trim whitespace or remove blank lines?
Both are optional toggles. Trim strips leading and trailing spaces from each item, and Drop blank lines removes empty rows (including a trailing newline) before chunking.
Can I split into a set number of chunks, or by length?
Yes. Set "Split by" to "Number of chunks" and the list is shared out as evenly as it can be — sizes differ by at most one, the larger chunks come first, and no chunk is ever empty. "Maximum characters per chunk" fills each chunk until the next item would push its written length, in the chosen output format, past the limit; an item longer than the limit on its own gets a chunk to itself, and the page says how many did.
Can I download each chunk as its own file, or keep the chunk boundaries in one file?
Yes. Every chunk has a download button beside its copy button and saves as a text file named from “File name for each chunk” — or, left empty, from the opened file or “chunks” — followed by the chunk number. For one file instead, tick “Put a numbered heading above each chunk in the copy and download”: the whole-result copy and download then put a numbered heading line above every chunk, so the boundaries stay clear even when blank lines are kept. It is off by default.
Can I choose what goes between the chunks in the copy and the download?
Yes. Once there are chunks, “Between chunks in the copy and download” offers “Default gap” — a blank line between chunks of plain lines and a line break in JSON, CSV and SQL — “Line break only”, “A --- line”, or “A line of my own…”, which puts whatever you type in “Line between chunks” on a line of its own. It works in every output format and with numbered headings; each chunk’s own copy and download buttons are not affected.