Add Line Numbers
Add line numbers to any text. Customize start number, separator, and zero/space padding. Free online tool with instant preview.
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
- Configure your preferred start number, separator, and padding style
- Paste or type your text in the input area
- 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
Compare Two Lists / Arrays
Compare two lists and find items unique to each, plus common items
List Randomizer / Shuffle
Shuffle and randomize list items using the Fisher-Yates algorithm
List Intersection (Common Items)
Find common items between two lists with case-sensitive toggle
List Union (Merge & Dedupe)
Merge two lists together and remove duplicates
List Difference (A − B)
Find items in List A that are not in List B (set difference)
Remove Empty Lines
Remove empty and blank lines from text instantly