Add Line Numbers

Prefix every line with a sequential number.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

The Add Line Numbers tool prefixes every line of your text with a running sequential number. It is useful for creating numbered lists, referencing lines in code reviews or documentation, preparing legal or transcript line references, and turning a plain list into an ordered one — all without a spreadsheet or text editor macro.

How it works

The tool splits your input on newlines and walks through it line by line, attaching a counter that increments with each numbered line. You control four options:

  • Start at — the first number, which can be 0, 1, or any positive or negative integer.
  • Separator — the characters placed between the number and the line text (e.g. ”. ”, ”: ”, ” | ”).
  • Zero padding — pads every number to the same width, calculated from the largest number that will actually be emitted so they align in a column.
  • Skip blank lines — leaves empty lines unnumbered while preserving their position.

Example

Numbering three lines starting at 1 with the ”. ” separator turns:

first line
second line
third line

into:

1. first line
2. second line
3. third line

With zero padding and 100+ lines, line 7 would render as 007. ... so every number lines up.

OptionEffect
Start at 1First line numbered 1
Separator ”. “Output “1. text”
Zero padding on”001”, “002”, … aligned
Skip blank linesEmpty lines left unnumbered

Everything runs in your browser — nothing is uploaded.

Ad placeholder (rectangle)