Skip to content

Line Numbering

Adds or removes leading line numbers with a start value, step, padding and separator.

Adds numbering to a list of lines, or takes existing numbering off. The removal is the harder half and the one worth having: it only strips leading numbers that form an increasing run, so a column of years or amounts is left alone.

🔒 Runs entirely in your browserlinesnumberingformat

Text

Numbering

Do

What goes between the number and the line.

Put it

Result

How to use it

  1. Choose add or remove

    Removing tells you how many lines it found numbering on and how confident it is, so you can see whether it read your data as a list.

  2. Set the start, step and separator

    A separator of ". " gives 1. text; ") " gives 1) text; a tab gives something a spreadsheet will split into two columns.

  3. Pad when the numbers must line up

    01, 02 … 11 keeps the text starting at the same column in a monospaced view, which matters for anything you are going to read in a terminal or diff.

Common questions

It refused to remove my numbers

The leading numbers do not increase, so they look like content — a column of years, prices or IDs. Refusing is the safe behaviour: deleting the first field of a data file is much worse than leaving a numbered list numbered.

What happens to blank lines?

With "skip blank lines" on they stay blank and do not consume a number, so the numbering counts items rather than lines. Turn it off to number every line including the empty ones.

Can I number from something other than 1?

Yes — set the start, and the step too. A step of 10 gives 10, 20, 30, which is the old BASIC convention for leaving room to insert lines later.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.