Line Number Adder

Add line numbers to any text or code snippet. Customize the starting number, separator, and padding style — results update instantly.

Input
0 lines
Result
0 lines numbered

How to use the Line Number Adder

Paste your text in the left panel and configure the options above. Numbers are added instantly to the right panel. Customize the starting number (useful when continuing from a previous snippet), the separator between the number and the line content, and the padding style.

The "Skip blank lines" option lets blank lines pass through unnumbered, keeping the visual structure of your text. "Step" lets you number lines in increments — for example, step 5 gives you 5, 10, 15, 20 which is common in some programming styles.

Common use cases

Code snippets — add line numbers before sharing code in documentation, emails, or blog posts so readers can reference specific lines.

Legal documents — many legal documents require numbered lines for reference during review or litigation.

Scripts & screenplays — number lines or scenes for easy reference during production.

Data files — add line numbers to CSV or text exports to track row positions.

Frequently asked questions

Auto padding automatically zero-pads numbers based on the total line count. If your text has 50 lines, numbers are padded to 2 digits (01, 02… 50). If it has 200 lines, numbers are padded to 3 digits (001, 002… 200). This keeps the columns aligned without over-padding short texts.
Yes — set any starting number in the "Start number" field. This is useful when you're continuing a snippet from a larger file and want the line numbers to match the original source.
No limit. All processing happens locally in your browser.
No. Your text never leaves your browser.

Other tools you might like