Add Line Numbers

Put a number in front of every line — starting where you want, counting how you want, padded so the columns line up. Nothing is uploaded.

Numbered
0Lines
0Numbered
Last number


          

How to use it

  1. Paste your text on the left, one item per line.
  2. Leave Start at 1 and Step 1 for ordinary numbering, or change them for anything else.
  3. Pick what goes after the number. A full stop suits a written list; a tab suits anything heading for a spreadsheet.
  4. The numbered version appears as you type. Press Copy result, or download it as a .txt file.

Why the zero padding matters

Numbers are not all the same width. Once a list passes item 9 the text after the number shifts one column to the right, and past 99 it shifts again, which is why a long numbered list looks ragged down its left edge. Pad with leading zeros works out how wide the biggest number will be and pads every number to match, so 007 sits directly above 108.

It is also the thing that makes numbered text sort correctly later. A plain alphabetical sort puts 10. before 2., because it compares characters rather than values — but 002 and 010 sort the way you expect in any program, including the ones with no natural-sort option. If you want to sort without padding, use the sort text lines tool, which handles numbers properly on its own.

Renumbering a list that is already numbered

Pasting from a document usually brings the old numbers along, and they are almost never the ones you want. Remove numbering that is already there strips a leading number together with the punctuation right after it — 1., 2), [3], 4 - — and then numbers the result from scratch. A line that merely starts with a number, like a year or a price, is left alone, because there is no separator following it.

Frequently asked questions

Why do my numbers look ragged down the left edge?

Because 9 is one character wide and 10 is two. Tick Pad with leading zeros and every number is padded to the width of the largest one, so 007 sits directly above 108 and the text after them starts in the same column.

Can I start at a number other than 1, or count in twos?

Yes. Set Start at to any whole number, including a negative one, and set Step to how much to add each line. Start at 0 with a step of 5 and you get 0, 5, 10, 15 down the page.

The text already has numbers on it. Can I renumber it?

Tick Remove numbering that is already there. It strips a leading number and the punctuation after it from each line, then numbers the result from scratch. Lines that simply begin with a year or a price are left alone, because those have no separator after the number.

Is my text sent anywhere?

No. The numbering happens in JavaScript inside your own browser. Nothing is uploaded and nothing is saved — close the tab and the text is gone.

Related tools