Add Line Numbers

Number lines with a custom start, step, separator, and padding.

Tool options

Enter text to get started.

How to use Add Line Numbers

  1. Paste or type your input. You can also load the example below.
  2. Adjust the available options. Results update after you finish typing; for very large inputs, select Run.
  3. Review the result, then copy it or download it to your device.

How this tool works

Start and step must be safe integers in complete digit notation; zero and negative steps are supported. The entire sequence is validated before output. Padding uses the full range, keeping negative signs ahead of zero padding. Skipped blank lines retain their original text and do not advance the count.

Input and output stay in the current page. Refreshing or closing the page clears them. For very large inputs, use Run to start processing; a task that takes too long is stopped so you can change the input.

Frequently asked questions

Can I count backwards?

Yes. Set a negative step. Numbers must remain between −9007199254740991 and 9007199254740991.

Is the final newline counted?

Yes. A trailing line break creates a final empty line. Enable skipping blanks to leave it unnumbered.