TL
Tool Lab
πŸ’°Donate
πŸ’°Donate

Line Number Adder

Add or remove line numbers from text with configurable separator and zero-padding.

Start at
Separator
Input
Output

About This Tool

The Line Number Adder prepends a sequential number to each line of text, or removes existing line numbers from numbered text. In Add Numbers mode, configure the starting number (default 1), the separator between number and content (period-space, parenthesis-space, colon-space, tab, or space), and whether to zero-pad numbers so all lines are equal width (e.g., 01, 02, … 10 instead of 1, 2, … 10).

In Remove Numbers mode, the tool strips leading digits and the selected separator from each line. All processing is instant and runs locally in the browser.

How to Use

  1. Choose Add Numbers or Remove Numbers.
  2. Paste text into the input area (or click Sample).
  3. In Add mode, set the start number, separator, and zero-padding options.
  4. Output updates instantly. Click Copy to copy the result.

Use Cases

Developers add line numbers to code excerpts before posting in documentation or bug reports so reviewers can reference specific lines. Technical writers number steps in multi-step procedures. Editors number manuscript lines for proofreading with page references. QA engineers number test cases exported from a list for a test report. Teachers number quiz questions or reading comprehension line references.

FAQ

  • Can I start numbering from 0? β€” Yes. Set the start number to 0 in the configuration.
  • What does zero-padding do? β€” Zero-padding ensures all numbers have the same width. For 10 lines starting at 1, numbers are padded to 01, 02, … 10. This keeps the text aligned in monospace fonts.
  • Can I remove numbers that start from a number other than 1? β€” Yes. The Remove mode strips any leading number (regardless of its value) followed by the selected separator.
  • What happens to blank lines when adding numbers? β€” Blank lines are numbered too. If you want to skip blank lines, use the Text Sorter tool to remove them first.