Add Line Numbers

Add line numbers to any text. Customize start number, separator, and zero/space padding. Free online tool with instant preview.

Everything runs in your browser — your data is never sent to any server.

Why Use the Add Line Numbers Tool?

Numbering lines is essential for code reviews, legal documents, transcripts, and educational materials. Our Add Line Numbers Tool lets you customize the starting number, separator style, and padding format to match any requirement.

Key Features

  • Customizable start number (0, 1, or any number)
  • Multiple separator options: dot, colon, dash, parenthesis, tab, spaces
  • Zero-padded or space-padded numbering for aligned columns
  • Side-by-side input and output for easy comparison

How to Use

  1. Configure your preferred start number, separator, and padding style
  2. Paste or type your text in the input area
  3. Copy the numbered result from the output area

Technical Details

Each line is prefixed with a formatted line number based on your settings. Zero-padding uses padStart with '0', while space-padding uses padStart with a space character. The padding width is automatically calculated from the total number of lines to ensure consistent alignment across all numbered lines.

FAQ

Can I start numbering from 0?

Yes, you can set any start number including 0. This is useful for programming contexts where line numbering often starts from zero.

What padding options are available?

Three options: None (variable width), Zero-padded (01, 02... 10, 11), and Space-padded ( 1, 2... 10, 11). Padding width adjusts automatically based on total lines.

Related tools