Line Number Generator

Adds a number to the start of every line of your text, with your own starting value, step and separator. Use it to refer to lines in a review or discussion, to label steps in a list, or to number lines in code, poems and scripts.

Up to 1 MiB.

Options

How to use the Line Number Generator

  1. Paste your text. Each line gets a number at the start.
  2. Set Start at, Step and the Text after the number (for example . , ) or a tab).
  3. Choose Align numbers to pad with zeros or spaces so the numbers line up.
  4. Turn on Do not number empty lines to keep blank lines unnumbered.

Limitations

  • Numbers are added to every line of the text, including lines that are only spaces, unless the last option is on.
  • Very large inputs are refused if the numbered result would be larger than 4 MiB.

Worked examples

Numbered list

Input

Preheat the oven
Mix the flour and sugar
Bake for 20 minutes

Result

1. Preheat the oven
2. Mix the flour and sugar
3. Bake for 20 minutes
Zero-padded, starting at 8

Input

alpha
beta
gamma

Result

08 | alpha
09 | beta
10 | gamma

Practical uses

  • Referencing lines in a review

    A reviewer pastes a short script and numbers each line. Comments in an email can then point to line 12 rather than describing where the text is. Both sides are looking at the same numbering, which saves confusion.

  • Numbering steps in instructions

    A trainer has a list of steps with one step per line. They set the text after the number to a full stop and a space, and the numbering is added to every line. No retyping is needed, and the steps are ready to paste into a handout.

  • Padded numbers for a data file

    An admin wants zero-padded numbers such as 001 and 002 on a list of entries. They choose the align option to pad with zeros. The numbers then sort correctly and line up in a plain text file.

Privacy: this tool runs entirely in your browser. Your text is not uploaded, logged or saved, and it is never sent to analytics. Maximum input: 1 MiB.