Random Sample from CSV

Pick a random sample of rows from a CSV: a set number, a percentage, every nth row, or a balanced sample per group.

FreeNo sign-upPrivate — your file never leaves your device
Sample

How to use the CSV Random Sample

  1. Open your CSVPaste the data or open a file. The header row is kept on top of the sample.
  2. Choose a methodRandom rows by number or percent, every nth row, a stratified sample that keeps each group’s share, or a fixed number per group.
  3. Download the sampleUse the same seed to get the same sample again, or click New seed for a different one.

Example

From 20 rows, “Random rows: 5” with seed 42 always returns the same 5 rows, so a colleague can repeat your sample.

Stratified 50% by city keeps the mix: Dhaka (8 rows) gives 4, Chattogram (6) gives 3, Sylhet and Khulna (3 each) give 2.

Frequently asked questions

Why use a seed?

A seed makes the random choice repeatable. The same data and the same seed always give the same sample, which matters for audits, tests and research.

What is a stratified sample?

It samples the same percentage from every group (for example every city), so small groups are not left out by chance and the sample keeps the original mix.

Is every row equally likely to be picked?

Yes. Random rows use a Fisher–Yates shuffle, so every row has the same chance and no row is picked twice.

Popular posts from this blog

Character Counter

Speech to Text Online

Keyboard Tester