CSV Splitter: Split a Large CSV into Smaller Files
By rows, size or column, any size. Free, and nothing is uploaded.
Split a CSV into smaller files
Drop a file here or choose one. CSV, TSV or TXT, any size. Every part keeps the header row.
The sample: a year of made-up hourly weather for six UK cities, 52,560 rows.
Your file never leaves your device. It is read and split by your browser, on your device. Nothing is uploaded.
At a glance
- Split by
- Rows (1,000,000 by default, so every part opens in Excel), size (for example 100 MB), or one file per value of a column.
- Every part
- Starts with the header row and keeps every row exactly as it is in your file: quotes, line breaks inside quotes, numbers and dates untouched.
- Files
- CSV, TSV and TXT, separated by commas, semicolons, tabs or pipes, with Windows or Unix line endings, of any size.
- You get
- One ZIP of the parts, named after your file (weather-part-001.csv, weather-part-002.csv and so on), or, in Chrome and Edge on a computer, the parts saved straight into a folder you choose.
- Processing
- Runs in your browser. Your file is never uploaded, not even its name.
- Price
- Free. No account or sign-up.
How to split a CSV file
- Choose your file. Drop it onto the splitter at the top of this page, or click “Choose a file”. CSV, TSV and TXT files of any size work. No file to hand? “Try it with sample data” loads a year of made-up UK weather.
- Choose how to split it. By rows (1,000,000 rows per part by default, so every part opens in Excel), by size in MB, or by a column, which makes one file per value, such as one per city.
- Split and download. Click “Split & download”. The parts come as one ZIP file; in Chrome and Edge on a computer you can save them straight into a folder instead. The list shows every part with its rows and size.
Split by rows, by size or by a column
By rows: parts that open in Excel
Every part gets the same number of rows under the header, and the last one what is left. The default, 1,000,000 rows, opens in Excel, which stops at 1,048,576 rows. Blank lines stay where they are, but they don’t count as rows.
By size: parts under a limit
Each part is at most the size you choose, the header included: handy for email attachments and upload limits. Parts end between two rows, never in the middle of one. A single row bigger than the limit gets a part of its own, and the tool tells you.
By a column: one file per value
Pick a column such as a city, a product or a month, and every value gets its own file, named after it: weather-London.csv, weather-Leeds.csv. The rows keep their order within each file. Up to 1,000 different values: a column with more, such as a timestamp, is refused with a message instead of making thousands of files.
Your rows, exactly as they were
The splitter never rewrites a row. Numbers, dates, leading zeros, quotes and line endings stay exactly as they are in your file, and a quoted value with a comma or a line break in it stays whole, because a part only ends at the end of a row. Lines above the header, such as a logger’s notes, and a units row under it are repeated with the header. Split by rows or by size, the parts put back together without their repeated headers are your original file, byte for byte.
A worked example: a year of UK weather
The sample behind “Try it with sample data” is a year of made-up hourly weather for six UK cities (London, Manchester, Leeds, Cardiff, Edinburgh, Belfast): 52,560 rows, 2.16 MB, one row per city per hour. Its first lines:
time,city,temperature,humidity,sky
2025-01-01 00:00,London,3.1,90,Cloudy
2025-01-01 00:00,Manchester,3.5,89,"Rain, light"
2025-01-01 00:00,Leeds,1.7,91,Showers
2025-01-01 00:00,Cardiff,2.6,98,"Rain, light"
2025-01-01 00:00,Edinburgh,2.2,92,Cloudy
2025-01-01 00:00,Belfast,2.3,91,ClearSplit by rows, 10,000 per part, it makes 6 files, each with the header on top:
| File | Rows | Size |
|---|---|---|
| uk-weather-hourly-2025-part-001.csv | 10,000 | 407 KB |
| uk-weather-hourly-2025-part-002.csv | 10,000 | 411 KB |
| uk-weather-hourly-2025-part-003.csv | 10,000 | 417 KB |
| uk-weather-hourly-2025-part-004.csv | 10,000 | 416 KB |
| uk-weather-hourly-2025-part-005.csv | 10,000 | 410 KB |
| uk-weather-hourly-2025-part-006.csv | 2,560 | 104 KB |
Split by the city column instead, it makes 6 files of 8,760 rows each, one per city, the rows still in time order:
| File | Rows | Size |
|---|---|---|
| uk-weather-hourly-2025-London.csv | 8,760 | 350 KB |
| uk-weather-hourly-2025-Manchester.csv | 8,760 | 385 KB |
| uk-weather-hourly-2025-Leeds.csv | 8,760 | 340 KB |
| uk-weather-hourly-2025-Cardiff.csv | 8,760 | 358 KB |
| uk-weather-hourly-2025-Edinburgh.csv | 8,760 | 375 KB |
| uk-weather-hourly-2025-Belfast.csv | 8,760 | 357 KB |
The sky column holds values such as "Rain, light", with a comma inside the quotes: they stay one value in every part.
Why split a CSV for Excel?
Excel opens at most 1,048,576 rows per sheet, and a longer CSV is cut off at that row. Splitting it into parts of 1,000,000 rows gives you files that each open whole. Our guide CSV too large for Excel? explains the limit and the other ways around it.
Don’t need Excel at all? The large CSV viewer scrolls, sorts and filters every row of the whole file. To know how many parts you will get, the CSV row counter counts the lines of any file in seconds. And to put parts back together, or combine exports, use Merge CSV files.
Private by design: nothing is uploaded
Online CSV splitters that upload your file send a copy to their server. MegaRows does not: the splitting runs entirely in your browser, on your device, and neither the file nor its name is sent anywhere. Read the privacy statement for details.
Other ways to split a CSV
macOS and Linux: split
split -l 1000000 big.csv part-Fast and built in, but the header ends up in the first part only, and a quoted value with a line break in it can be cut in two between parts.
Python: pandas
import pandas as pd
for i, part in enumerate(pd.read_csv("big.csv", chunksize=1_000_000)):
part.to_csv(f"part-{i + 1:03}.csv", index=False)Repeats the header in every part, but every value is read and written again: numbers can change their format and leading zeros disappear unless you read every column as text with dtype=str.
Frequently asked questions
How do I split a large CSV file into smaller files?
Choose the file in the splitter at the top of this page, keep “By rows” with 1,000,000 rows per part (or pick a size or a column) and click “Split & download”. You get a ZIP of the parts, each starting with the header row. It runs in your browser: nothing to install, nothing uploaded.
How many rows can Excel open?
At most 1,048,576 rows per sheet, the header included; a longer CSV is cut off at that row. Parts of 1,000,000 rows, the splitter’s default, stay well under the limit, so every part opens whole.
Does every part keep the header row?
Yes. Every part starts with the header row exactly as it is in your file, and so do any lines above it (a logger’s notes, for example) and a units row under it. Untick “Repeat the header row in every part” if your file has no header.
Will splitting change my data?
No. Rows are copied exactly as they are: numbers, dates, leading zeros, quotes and line endings stay the same. A quoted value with a comma or a line break in it is never cut in two, because a part only ends at the end of a row.
Is my file uploaded?
No. Your browser reads and splits the file on your own device, and neither the file nor its name is sent anywhere. That makes it safe for customer lists, financial exports and other data that must not leave your computer.
How big a file can I split?
There is no fixed limit on the size of the file or the number of rows: the practical limit is your device. In our tests, a 423 MB CSV split into ten parts of 1,000,000 rows, as one ZIP, in about a second (Chrome on an Apple M4 laptop, October 2026). Split by rows or by size, memory use stays small however big the file is. In Chrome and Edge on a computer, saving the parts into a folder is the best choice for the biggest files.
Can I split by the values of a column?
Yes. Choose “By a column” and pick the column: you get one file per value, named after it, such as weather-London.csv and weather-Leeds.csv, with the rows in their original order. A column with more than 1,000 different values, such as a timestamp, is refused with a message instead of making thousands of files.
Can I split an Excel (.xlsx) file?
Not yet: the splitter reads text files (CSV, TSV and TXT). Save the sheet as “CSV UTF-8” in Excel first, then split the CSV.
Related tools and guides
- CSV plotterOpen a CSV, Excel, TXT, JSON, MATLAB, Parquet, HDF5 or LabVIEW TDMS file with millions of rows and plot it in several linked charts, with zoom and statistics. Works today.
- Large CSV viewerOpen a CSV with millions of rows in your browser: scroll every row, see each column’s type and statistics, chart any column. Works today.
- MATLAB .mat file viewerOpen v4 to v7.3 .mat files without MATLAB and plot any signal. Works today.
- Parquet viewerOpen large .parquet files, see the schema at once and plot millions of rows, without Python. Works today.
- TDMS viewerOpen .tdms files from LabVIEW, DIAdem and DAQmx loggers: every group, channel and property, each channel plotted against its time. Works today.
- HDF5 viewerOpen .h5, .hdf5 and NetCDF-4 .nc files: every group, dataset and attribute, each group’s datasets plotted against their time. Works today.
- MAT to CSVConvert the signals of a .mat file, v4 to v7.3, to a CSV for Excel or Python, without MATLAB. Works today.
- Parquet to CSVConvert a .parquet file to CSV in your browser, with the columns you pick. Works today.
- TDMS to CSVConvert the channels of a .tdms file to CSV, a group at a time, with its time column, without LabVIEW or Excel add-ins. Works today.
- HDF5 to CSVConvert the datasets of an .h5 or NetCDF-4 file to CSV, a table at a time, with its time column, without Python. Works today.
- Excel to CSVConvert any sheet of an .xlsx or .xlsm workbook to CSV, with the saved results of formulas, real dates and 15 significant digits. Works today.
- JSON to CSVConvert JSON and JSON Lines files to CSV: nested fields become columns named by their path, arrays stay as JSON text. Works today.
- CSV to MATConvert a CSV, Excel, JSON or Parquet file to a MATLAB .mat file: a field per column, with names and units, every row. Works today.
- Merge CSV filesAppend many CSV files into one, even with different columns or separators. Works today.
- CSV row counterCount the lines in a CSV, TSV or TXT file of any size. Works today.
- CSV statisticsCount, missing values, min, max, mean, standard deviation, RMS and peak to peak of each number column, for the whole file or the rows you zoom into. Works today.
- CSV histogramA histogram of any number column, with automatic bins or 10 to 200 of them, and each bin’s count as a table. Works today.
- CSV too large for Excel?Open every row of a CSV beyond Excel’s 1,048,576-row limit, or work around the limit in six other ways.
- FFT and PSD from a CSVTurn a signal column into an FFT spectrum or a PSD with Grms, with results checked against SciPy. Works today.
- PSD calculatorTurn a vibration column into a power spectral density (Welch) in g²/Hz, with the Grms of any band and a dB view. Works today.
- Spectrogram from CSVSee how the frequencies of a measured signal change over time, as a heat map in dB, with the window and range you choose. Works today.
- FRF and coherencePick an input and an output column and get the frequency response (H1, H2, magnitude and phase) and their coherence. Works today.
- The MegaRows toolboxWhat works today and what is coming next, and why nothing is ever uploaded.
Coming soon to MegaRows: CSV to Excel and PDF reports · Compare CSV versions.
MegaRows processes files locally in your browser. Nothing is uploaded, not even the file name.