CSV Splitter: Split by Rows, Column or Size
Pricing
from $0.07 / 1,000 processed rows
CSV Splitter: Split by Rows, Column or Size
CSV splitter for files over CRM and Google Sheets limits: cut a CSV or JSON file or an Apify dataset by rows, parts, column value or size. One download link per part. Empty input = free demo.
Pricing
from $0.07 / 1,000 processed rows
Rating
0.0
(0)
Developer
Actor Factory
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
Share
Cut a big CSV or Apify dataset into parts, by rows, column or size
Returns one file (or dataset) per part, each with a download link — cut from one or more Apify datasets or a CSV / TSV / JSON / NDJSON file URL by rows, number of parts, column value or size, or a random sample. For anyone whose file is too big for the next tool: Google Sheets stops at 10 million cells, a CRM import accepts 10,000 rows at a time, a colleague needs one file per country. Every part repeats the header row, and values stay exactly as in the file (a ZIP code 00123 stays 00123).
Opens in Excel: the source can be UTF-8, Shift_JIS or Windows-1252 (detected automatically); parts are written as UTF-8, and csvBom adds a byte-order mark so Excel shows non-English text correctly.
- Cost: $0.0001 per row processed ($0.10 per 1,000 rows). The $5 monthly free credit covers about 50,000 rows. Failed runs and the demo are free. No scraping, no API keys.
Sample output (150 rows split into parts of 50):
| partIndex | key | rows | bytes | downloadUrl |
|---|---|---|---|---|
| 1 | iris-part-001.csv | 50 | 1,740 | https://api.apify.com/v2/key-value-stores/…/records/iris-part-001.csv?signature=… |
| 2 | iris-part-002.csv | 50 | 1,751 | … |
| 3 | iris-part-003.csv | 50 | 1,760 | … |
Smallest input:
{ "fileUrl": "https://example.com/big.csv", "splitMode": "rows", "rowsPerPart": 10000 }
Result: one file per 10,000 rows, each with the header row and a download link.
Try it free: leave input empty and press Start. The demo splits a built-in 25-row sample CSV into parts of 10 rows (not charged, rows carry _demo: true).
What it does
- Fixed rows per part: for example 10,000 rows per file for CRM imports or Google Sheets
- Fixed number of parts: split into N files of nearly equal size
- One part per column value: one file per country, status or customer, with a cap on the number of parts
- Approximate size per part: aim for files of about 5 MB (estimated from the output format, so allow some percent of difference)
- Random sample instead of splitting: n rows or a percentage, with a seed so the same sample can be drawn again (rows keep their original order)
- Output: CSV, JSON, NDJSON or XLSX files in the key-value store, and/or one new named dataset per part
- Reads an Apify dataset (pick it from your runs) or a public file URL; detects the format, the delimiter and the text encoding (UTF-8, Shift_JIS, Windows-1252)
- Keeps your data as it is: CSV values stay exactly as in the file (a ZIP code
00123stays00123); turn ondetectNumbersif you want real numbers in XLSX or JSON. Every part repeats the header row. Text starting with=,+,-,@is stored as plain text in XLSX, never as a formula
Input example
{"fileUrl": "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv","splitMode": "column","column": "species","outputFormat": "xlsx"}
Defaults when a field is empty: rowsPerPart 10,000, partCount 2, targetSizeMb 5 (XLSX is estimated at about 40% of the CSV size), maxParts 500. In sample mode sampleRows wins over samplePercent; the same seed on the same data gives the same sample, and an empty seed is reported in the output. For Apify datasets, only top-level fields count as columns. Use datasets or a file URL, not both.
To split Apify datasets use datasetIds (several datasets are joined in the order given and split as one table; the older single datasetId still works). Modes and their fields: rows (rowsPerPart), parts (partCount), column (column, maxParts), size (targetSizeMb), sample (sampleRows or samplePercent, seed).
Output
- Dataset: one summary row per part with
partIndex,key(file name in the key-value store),value(the column value, for split by column),rows,bytes,format,downloadUrland, when datasets are written,datasetNameanddatasetId. In sample mode the row also has theseedused. A failed run has one row withstatus: failedand a plain-languageerror. - Key-value store: the part files, named
<source>-part-001.csv,<source>-<value>.csvor<source>-sample.csv(change the start withfileName).downloadUrlis Apify's signed public link, so you can share a file without sharing your token. - New datasets (option
saveToDatasets):prefix-001,prefix-002, ... The default prefix issplit-plus the run ID, so it is always new. Named datasets stay until you delete them; the run stops before writing if one of them already has items. - STATS record: input rows, parts, bytes, rows charged, notes and the sample seed.
{"partIndex": 1, "status": "ok", "key": "iris-part-001.csv", "value": null,"rows": 50, "bytes": 1740, "format": "csv","downloadUrl": "https://api.apify.com/v2/key-value-stores/…/records/iris-part-001.csv?signature=…"}
Limits (cannot be raised by input)
- 2,000,000 rows and 1,000 columns per run; 500 parts per run; 200 MB per source file
- A run that would break a limit fails before anything is written and is not charged; rows are never silently cut. Example: 1,000,000 rows at 1,000 rows per part would need 1,000 parts, so the run asks for at least 2,000 rows per part
- XLSX parts can have at most 1,048,575 rows (Excel's limit); use CSV or smaller parts. A warning is logged when a part is bigger than the Google Sheets limit of 10,000,000 cells
- Source URLs must be public
httporhttpslinks. Addresses on internal networks (localhost, private ranges, cloud metadata) are blocked, also after redirects. XLSX and zip files are not read (convert them to CSV first) - JSON input must be an array of objects (or an object with one such array); nested values are kept as JSON text in CSV and XLSX output and as nested JSON in JSON, NDJSON and datasets
- The whole source is held in memory. Rough guide per 1 GB of run memory: about 500,000 CSV rows or 350,000 JSON rows of a dozen short columns (fewer with wide rows). The default 2 GB covers about twice that; for more rows start the run with 4 GB or more memory
Pricing
Pay per event: $0.0001 per row processed ($0.10 per 1,000 rows, event row). All rows read from the source count once: 2,500 rows cost $0.25, regardless of mode, number of parts or output format (a random sample is charged for the rows read, not for the sample size). Nothing is charged for a failed run or the demo. The charge is made after all parts are saved. Set a maximum cost per run to cap spend: if it is too low for the whole source, the run ends (status Succeeded) without splitting or charging anything, and the status message, STATS (stoppedAtChargeLimit: true) and a dataset row with status: stopped_at_charge_limit say how many rows it covers and what the whole source would cost.
Price example: a 25,000-row file costs $2.50, whether you make 3 parts or 300; a 150-row file costs $0.015.
On the Apify Free plan, the $5 of monthly platform credit covers about 50,000 rows a month — enough to try it on real data.
Use cases
- Cut a 600,000-row export into files of 10,000 rows for a CRM or e-mail tool import
- Keep a spreadsheet under Google Sheets' 10 million cell limit
- One Excel file per sales region, country or account manager
- Send a reproducible 5 percent test sample of a large dataset to a colleague or a model
- Break a large scraper dataset into 5 smaller datasets that can be processed in parallel
FAQ
Does the order of rows stay the same? Yes, in every mode (also in the sample). In the rows, parts and size modes the parts are consecutive blocks of the source.
What happens to rows with an empty value in the split column? They go to a part named empty.
How exact is the size mode? It estimates each row's size in the chosen format and fills parts up to the target. CSV, JSON and NDJSON are usually within a few percent; XLSX is compressed, so it is only a rough guide.
Can I run it twice with the same dataset prefix? Not if the first run left items in those datasets. Pick a new prefix or delete the old datasets.
Does it change my source? No. It only reads the file or dataset and writes new files.
Is the file link private? Anyone holding the signed link can download that file; it gives no access to anything else in your account.
Which file encodings can it read? UTF-8 (with or without BOM), Shift_JIS and Windows-1252, detected automatically; you can also pick one in Input text encoding. Parts are always written as UTF-8.
Excel shows garbled text when I open a split CSV. What can I do? Turn on csvBom (CSV: add UTF-8 BOM for Excel). It adds a byte-order mark so Excel opens non-English text such as Japanese correctly. Leave it off for databases and most code.
Can I split an .xlsx file or a zip file? Not as input: XLSX and zip files are not read, so convert them to CSV first (for example with CSV to Excel Converter). XLSX is available as an output format.
Does every part keep the header row? Yes, every part repeats the header row.
Can I combine files before splitting? Several Apify datasets can be listed in datasetIds; they are joined in the order given and split as one table.
What is the most I can split in one run? 2,000,000 rows, 1,000 columns, 500 parts and a 200 MB source file. A run that would break a limit fails before anything is written and is not charged.
Related: need Excel or JSON files back? CSV to Excel Converter converts CSV, TSV, XLSX, JSON and NDJSON into each other. Only want some rows? Filter Rows before you split. Want totals per group? Group By & Aggregate. Garbled characters in the source? CSV Encoding Converter.
If this Actor saved you time, a rating on the Store helps others find it.
More tools from the same developer
- Dataset Transform — flatten, filter, rename and convert any Apify dataset, export CSV / JSON / JSONL with a link
- Remove Duplicates — merge Apify datasets and remove duplicates by the fields you choose
- CSV to Excel Converter — convert CSV, TSV, Excel XLSX, JSON and NDJSON files or Apify datasets into each other
- Google Sheets Export — export an Apify dataset to Google Sheets
- Fuzzy Dedupe — find near-duplicate names, addresses, phones and URLs that exact dedup misses
Feedback helps: rate this Actor on its Store page, or open an issue if something didn't work.