Take a sample of CSV records
Paste CSV with a header, enter Number of records to sample, and select Sample rows. The tool picks row positions without replacement and keeps the original header. The sample size must be an integer between one and the number of available data records.
Try the five-record example
Load the example containing Ada, Lin, Kim, Sam and Jo. A size of 2 returns two of those records. The names can change on each run; there is no single expected pair. With Keep sampled rows in source order enabled, the two selected rows appear in the same relative order as the input. Disable it to keep selection order instead. Choosing a sample size of five with source-order preservation returns all five records in their original order.
What random means here
The implementation performs a partial Fisher–Yates shuffle using the browser's Math.random source. It samples positions, so a row position appears at most once. If the source contains identical records at different positions, the output can still contain identical rows. Run CSV Deduplicator first when exact repeated records should count only once.
This is a convenience tool for inspecting a subset of an export. It has no reproducible seed, cryptographic randomness guarantee, stratification, weighting or sample-size recommendation. A small selection may omit important groups or rare values. Repeated runs can produce the same sample by chance; a new run does not promise a different result.
Boundaries and export
CSV must use commas, unique nonempty headers and consistent record widths. Quoted commas and multiline values remain complete cells. Input limits are 200,000 characters, 200 columns and 10,000 data rows; output is capped at two million characters. Zero, fractional sizes and requests larger than the source produce errors.
Preserve export keeps original cell strings and normalizes quoting and line endings. Optional spreadsheet protection prefixes formula-like values with apostrophes, which changes cells including negative numbers. All work stays in the browser. Editing input or any option clears the previous sample and download. Use CSV Row Splitter for contiguous batches, or CSV Row Filter when selection should follow a specific condition.





