Add Line Numbers

Put a number in front of every line.

Result

1. first
2. second
3. third
3 lines · 27 bytes

How does adding line numbers work?

The tool puts a counter at the start of each line. By default it counts from 1 and adds a full stop and a space, so the lines first, second and third become "1. first", "2. second" and "3. third". You can change the starting number and the text between the number and the line.

Padding keeps the columns tidy. With zero padding, a list that runs from 8 to 11 becomes 08, 09, 10, 11. With space padding the numbers are right-aligned. Line numbers are handy for code listings, scripts, transcripts and any list you need to refer to by number.

How to use the Add Line Numbers

  1. Paste your lines.
  2. Set the starting number and the separator.
  3. Choose no padding, zero padding or space padding.
  4. Copy the numbered text.

Real situations

When people use the Add Line Numbers

  • 1

    Reference lines in a review or email

    Number a pasted passage so people can say "see line 14" without ambiguity.

  • 2

    Number steps or items quickly

    Turn a plain list into a numbered one without typing each number.

  • 3

    Add numbers to a code sample

    Show line numbers beside a snippet for a tutorial or a bug report.

  • 4

    Continue a list from another

    Start at any number, so a second list carries on where the first stopped.

FAQ

Add Line Numbers: questions answered

Can I start at a number other than 1?

Yes. Set "Start at" to any whole number. Starting at 8 gives 8, 9, 10 and so on, and with zero padding they show as 08, 09, 10.

How do zero and space padding differ?

Zero padding fills with zeros (001, 002, 010) and space padding fills with spaces so digits line up on the right. The width is set by the largest number, so a 100-line list pads to three digits.

Can I change the separator?

Yes. The default is a full stop and a space. Use a colon, a tab-like gap, a closing bracket or anything else you like, such as ": " or ") ".

Are empty lines numbered?

Yes, every line in your text gets a number, including blank lines inside the text. Use the remove empty lines tool first if you do not want them counted.

How do I remove line numbers again?

This tool only adds them. To strip them, you would need to delete the leading numbers with a find and replace in an editor that supports patterns.

Does it work with long text?

Yes. It numbers every line you paste. The output is plain text that you can copy or download.

Is this Add Line Numbers free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way