๐Ÿ”ข Line Numbering Tool

Automatically add sequential numbers to every line of a block of text. Choose a starting number and separator (like ". " or ": "), and optionally skip blank lines or zero-pad the numbers to a consistent width.

How to use

  1. Enter the text you want to number.
  2. Choose your starting number, separator, and other options.
  3. The numbered result appears automatically. Use the "Copy" button to copy it.

How the calculation works

This tool splits the input into lines and adds a number at the start of each one, counting up by 1 from the start number you choose, followed by the separator you pick (". ", ": ", ") " or " | "). With "Skip blank lines" on, lines that contain only whitespace get no number, and the count carries on to the next line. The empty lines stay in the output, so you can number only the lines with content while keeping paragraph breaks. With "Zero-pad" on, numbers are padded with leading zeros to the width of the last number. For example, starting at 1 with 10 lines, the last number is 10 (two digits), so 1 to 9 become "01" to "09". Equal widths make the list easier to read in a monospaced font and keep the order correct when the lines are sorted as text.

Worked example

Input (11 lines, the third one empty) a / b / (empty) / c / d / e / f / g / h / i / j Settings: start 1, separator ". ", skip blank lines, zero-pad Output 01. a 02. b 03. c 04. d โ€ฆ 10. j Ten non-empty lines are numbered, so the last number is 10 and every number is padded to two digits.

Things to be aware of

  • The start number can be 0 or negative. With negative numbers, zero-padding may not line up evenly.
  • The separator includes a trailing space (". " is a period followed by a space).
  • Lines are determined by line breaks. A long line that only wraps on screen still gets a single number.

FAQ

Do blank lines get numbered too?

With "Skip blank lines" on, lines with no content aren't numbered and are left as blank lines in the output.

Can I make the numbers a consistent width?

Yes โ€” turn on "Zero-pad" to pad numbers with leading zeros to match the width of the largest line number, like 01, 02.

Can I start from a number other than 1?

Yes โ€” set any starting number you like, including 0 or negative numbers.