Keep only the first or last rows of a CSV

Cut a CSV down to its first 1,000 rows, or its last 50, with the heading kept — a quick test file from a big export, in your browser.

First or last rows of a CSVRunning on your device

Source

or drag one here · it stays on your device

Result

Add a file, choose how many rows from which end, and the cut appears here before anything downloads.

Download

Have a look at the result before downloading it.

How this works
  1. Add your file. Drop a CSV onto the page, or pick one.
  2. Choose first or last, and how many. And optionally how many to skip.
  3. Cut the file. Check the preview, then download.
What it cannot do
  • One piece per run; cutting a file into many equal pieces is a separate, planned tool.
Questions
Does it keep the heading row?
Yes. The heading is not counted as one of the rows you keep.
Can I skip some rows and then keep some?
Yes — skip the first 100, keep the next 50, for example.
Does it change any values?
No. When you keep only the first or last rows of a CSV here, every cell is carried through as the exact text in your file — leading zeros, long numbers and dates included. To keep only the first or last rows of a CSV is to change the arrangement, never a value: the download is written fresh with standard quoting and nothing in it is retyped.
Is this a way to split a big file into pieces?
For one piece, yes. To cut a file into many files of equal size, a split tool is on the roadmap; until then run this page more than once with different skips.
Is my file uploaded anywhere?
No. When you keep only the first or last rows of a CSV here, the work happens inside this page and the browser is told to block outbound connections, so there is no upload to intercept. Watch the Network tab of your developer tools while you keep only the first or last rows of a CSV: the only requests are for this site’s own code, and none carries your file.

Your file is processed in this page and never uploaded — the privacy page shows how to confirm that yourself.