Skip to content

Add Line Numbers to Text

Add a number to the start of every line of your text, with the first number, the separator and the padding you choose.

Line numbering
Paste your lines, choose the style.

Result
Numbered lines
1. first line
2. second line

3. fourth line
3
Lines numbered

Private: Everything runs in this page. Nothing you type is sent anywhere or saved.

On this page
  1. Line numbering examples
  2. Formula
  3. How the line numbering works
  4. What this tool does not do
  5. Frequently asked questions
  6. Related tools

Line numbering examples

Input linesOptionsResult
a, b, cdot, none, from 11. a | 2. b | 3. c
a, b, cparen, none, from 55) a | 6) b | 7) c
x, ycolon, zeros, from 909: x | 10: y
a, b, c, d, e, f, g, h, i, jdot, spaces, from 1 1. a | 2. b | 3. c | 4. d | 5. e | 6. f | 7. g | 8. h | 9. i | 10. j

Formula

line k gets the number (first number + k - 1), then the separator, then the line

How the line numbering works

  1. Step onePaste your text. Each line break starts a new line.
  2. Step twoChoose the first number, the text between the number and the line, and whether to pad the numbers.
  3. Step threeCopy the numbered text from the result box.

What this tool does not do

  • It numbers lines as they are broken in the box; it does not wrap long lines for you.
  • It does not make a real numbered list with indentation, as a word processor does.
  • It adds the numbers to the text only; it does not remove numbers that are already there.

Frequently asked questions

Can the numbering start at 0?

Yes. Type 0 in the first number box. Whole numbers from 0 to 999,999,999 are accepted.

What does padding do?

Padding gives every number the same width so the lines stay lined up: spaces on the left ( 9, 10) or zeros (09, 10).

Are empty lines numbered?

Not by default, so the numbers follow your real lines. Untick the box to number empty lines too.