Slice CSV Rows
Cut a CSV down to the rows you need — the first 100 for a quick look, the last 50 to see recent records, rows 500–600 to inspect the middle, or every tenth row to thin a huge export. It's head and tail for CSV, except the header row is always carried through so the result stays a valid file.
How to slice a CSV
- Paste the CSV or drop a file.
- Pick a mode and set N. For a range, N is the first row and to row is the last — both counted from 1, both inclusive, ignoring the header. Fields that don't apply to the current mode are hidden.
- Read the status line to confirm how many rows were kept out of how many.
- Copy or download the result.
What each mode is for
- First N — a sample to eyeball the shape of a file, or a small test fixture.
- Last N — the newest records in an append-ordered export, or checking whether a file was truncated.
- Rows N to M — inspecting the region around a row that failed to import.
- Every Nth — thinning a dense time series so a chart stays readable, keeping the spread of the whole file rather than one end of it.
- All but the first N — dropping preamble rows a report generator added above your data.
- All but the last N — removing a totals row, or a trailing summary block.
Slicing versus sampling
Slicing is positional and reproducible: the same input always gives the same rows. That's what you want for debugging a specific region or trimming known junk. If you want rows that represent the file rather than one part of it — because it's sorted by date, region, or ID and any slice would be biased — use Random sample, which can also take a seed so the selection is repeatable.
FAQ
Does N count the header row?
No. N counts data rows, and the header is always kept on top of the output.
What if N is bigger than the file?
You get the whole file back, and the status line shows the real number of rows kept.
How do I split a file into equal chunks instead?
Split CSV does that, and can hand you every chunk as a single zip.
Is anything uploaded?
No. Slicing happens in your browser.
Privacy
100% client-side. No upload. See the privacy policy.