Skip to content
Jellykit

Add Line Numbers

Number each line of a text with your choice of start, padding and separator, or remove numbering that is already there.

  • Runs on your device
Loading tool

About Add Line Numbers

Number the steps of a recipe, the lines of a poem or a snippet you want to discuss line by line. Choose the first number, a separator such as "1." or "1:" or a tab, and pad with zeros or spaces so the text lines up. Blank lines can be skipped so that only lines with text get a number.

Switch to Remove numbers to clean up code or a list copied with its line numbers. It only removes numbering when every non-blank line starts with one, so ordinary text that happens to begin with a figure is left alone.

How it works

  1. The text is split at every line break, and each line gets the next number followed by the separator you chose. Line endings and a final newline are kept as they were.
  2. Padding is worked out from the last number, so with 120 lines and zero padding the first line is "001".
  3. Removing looks for a number at the start of each line, optionally indented, followed by a full stop, colon, bracket, bar, tab or space. If any non-blank line lacks one, nothing is removed and the line is named.

Questions

Why did Remove numbers leave my text unchanged?

At least one non-blank line does not start with a number, and the message names the first one. This keeps lines such as "2024 was a good year" from losing their first word when the text is not a numbered list.

Will removing numbers also remove my indentation?

No. Only the number, its separator and one space or tab after it are removed, so code keeps its indentation.

Can I number from 0 or from a large number?

Yes. Any whole number from 0 to 1,000,000,000 can be the first number.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.