MyKit.tools

Add Line Numbers

Prepend line numbers to every line of text. Choose start number, separator style, and optional padding for aligned numbers.

Start from
Separator

When to Number Lines

Adding line numbers makes text easier to reference, discuss, and navigate. Code reviewers use numbered lines to point to specific sections ('see line 42'). Legal documents, scripts, and academic papers often require numbered lines for precise citation. Teachers number lines in reading passages so students can locate specific text quickly.

This tool lets you paste any text and instantly add line numbers with configurable formatting. Choose your separator (dot, colon, tab, or custom), set the starting number, and adjust padding so numbers align neatly regardless of how many lines you have.

Formatting Options

The separator appears between the line number and the text content. A tab separator aligns text in columns, which works well for code. A dot and space ('1. ') creates a numbered list format. A colon ('1: ') is common in code review contexts. Zero-padding ensures consistent width, so lines are numbered 001, 002, 003 instead of 1, 2, 3.

Starting from zero is useful for programming contexts where arrays and indices are zero-based. Starting from a number other than one is helpful when numbering a section of a larger document or continuing from a previous page.

Frequently Asked Questions

Can I start numbering from zero?

Yes. Set the starting number to 0, which is useful for programming contexts where zero-based indexing is standard. You can start from any number, so you can also continue numbering from where a previous section left off.

Does it handle thousands of lines?

Yes. The tool processes text entirely in your browser and handles tens of thousands of lines without any issues. Padding automatically adjusts to the total number of lines, so line 1 and line 10,000 stay neatly aligned.

What is zero-padding?

Zero-padding adds leading zeros so all line numbers have the same width. For a 200-line document, line 1 becomes '001' and line 42 becomes '042'. This keeps text aligned in monospaced fonts and is standard in log files and programming output.

Related Tools