Add a row number column to a CSV

Add a numbered column to a CSV — starting from 1 or any number, as the first or last column — so every row has an id. In your browser, nothing uploaded.

Add row numbers to a CSVRunning on your device

Source

or drag one here · it stays on your device

Result

Add a file and every row appears here with its number 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 the heading, start and position. Defaults are fine for most files.
  3. Number the rows. Check the preview, then download.
What it cannot do
  • Numbers follow the order of the rows in the file; sort first if a different order matters.
Questions
Where does the number column go?
First by default, or last if you prefer, under whatever heading you give it.
Can it start from a number other than 1?
Yes — any whole starting number and any step, so 1000, 1010, 1020 is as easy as 1, 2, 3.
Does it change anything else in the file?
No. The only thing added is the number column, written as text so a padded 001 stays 001. Every other cell is carried through as the exact text in your file — leading zeros, long numbers and dates included — and the rows keep the order they had.
Can the numbers have leading zeros?
Yes — choose a width and the numbers are padded, 001, 002, 003, and they stay that way, because nothing here turns text into numbers.
Is my file uploaded anywhere?
No. When you add a row number column to 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 add a row number column to 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.