Shuffle Excel Files Online
Randomly shuffle the row order of Excel files directly in your browser. Useful for randomising data before sampling or ML train/test splits.
How to shuffle Excel files
- Drop your file. The row count, column count and first 200 rows are shown.
- Click Shuffle rows. Every row gets a random position in one pass. There are no settings.
- Check the preview, which now shows the first 200 rows of the shuffled result.
- Click Shuffle rows again for a different order, or download the result in the same format you uploaded.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Worked example
A small image-classification dataset lists its files grouped by label, all cats first and then all dogs. Taking the first 80% of rows for training would leave almost no dogs in the training set.
Input (Excel)
Excel workbook, first sheet (Sheet1)
| image_id | label | width_px | height_px |
|---|---|---|---|
| img_0001.jpg | cat | 640 | 480 |
| img_0002.jpg | cat | 800 | 600 |
| img_0003.jpg | cat | 640 | 640 |
| img_0004.jpg | dog | 1024 | 768 |
| img_0005.jpg | dog | 640 | 480 |
Settings
- No options: click Shuffle rows
Result
| image_id | label | width_px | height_px |
|---|---|---|---|
| img_0004.jpg | dog | 1024 | 768 |
| img_0002.jpg | cat | 800 | 600 |
| img_0005.jpg | dog | 640 | 480 |
| img_0001.jpg | cat | 640 | 480 |
| img_0003.jpg | cat | 640 | 640 |
The same five rows are there with every value unchanged, but the labels are now mixed through the file. This is one possible order. Each click produces a new random order and there is no seed to repeat it, so keep the downloaded file if you need the same split later. The first four rows of the shuffled file now make a random 80% sample.
Working with Excel files
Only the first sheet is shuffled, and the header must be in row 1. Cells are loaded as the text they display, so formulas come through as their cached results and number formats such as currency symbols become part of the value. Formulas that refer to neighbouring rows, like a running total, would be wrong after any shuffle, so getting plain values is the safer outcome here. Hidden rows and rows removed by an AutoFilter are loaded and shuffled too, because the loader reads every row on the sheet, not only the visible ones.
The download is a new workbook with a single sheet named Sheet1. Colours, column widths, filters and any other sheets are not kept. Values that loaded as text stay text. If you use Excel's own trick of sorting by a RAND() helper column instead, remember that RAND recalculates on every edit, while the order in this download is fixed.
Frequently Asked Questions
Is this the same as sorting by a RAND() column in Excel?
The result is similar: every row gets a random position. Here it takes one click, needs no helper column, and the order stays fixed in the downloaded file.
Will my Excel formulas survive the shuffle?
No. The workbook is rebuilt from cell values, so each formula is replaced by the value it showed when the file was saved.
Can I get the same shuffle again?
Not from this tool. Each run uses a new random order with no seed. Save the shuffled file and reuse it. For a repeatable order, use the SQL Query tool and sort by a hash of a key column, for example ORDER BY hash(id).
Does shuffling change any values?
No values are changed and every row is kept. The file is written again by the exporter, though, so formatting can change. For example, a CSV value of 1.50 in a number column is written as 1.5.
How do I make a train and test split after shuffling?
Download the shuffled file, then use the Split tool with the size of your training set as the row count. The first file is your training set and the second your test set. For one random subset without a split, the Sample tool's random mode does it in one step.
Related Tools
Split Excel Files Online
Split Excel files into multiple smaller files by row count, directly in your browser.
Extract Head of Excel Files Online
Extract the first N rows from Excel files directly in your browser. Choose how many rows to keep and download the result — no upload required.
Sample Excel Files Online
Sample rows from Excel files — first N, last N, or random — directly in your browser.
Shuffle CSV Files Online
Randomly shuffle the row order of CSV files directly in your browser. Useful for randomising data before sampling or ML train/test splits.
Shuffle Parquet Files Online
Randomly shuffle the row order of Parquet files directly in your browser. Useful for randomising data before sampling or ML train/test splits.
Shuffle JSON Files Online
Randomly shuffle the row order of JSON files directly in your browser. Useful for randomising data before sampling or ML train/test splits.
Excel Viewer Online
View and inspect Excel files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert Excel to Parquet Online
Convert Excel files to Parquet format directly in your browser. No upload required — your data never leaves your device.