Add Line Numbers

Number every line of text (or strip numbers off), with padding and formats.

About this tool

Paste text and every line is numbered straight away. Choose the starting number, the step, the format (1. or 1) or 1: or [1] or a tab), zero-padding or right-alignment, and whether blank lines are skipped. Switch to Remove numbers to strip existing numbering. Copy the result, or feed it back in as new input.

When line numbers help

Line numbers let people point at an exact spot, such as "see line 14" in a contract review, a script read-through, a poem in class, a transcript, a code snippet in an email or a list of survey answers. Numbering by hand is slow and breaks as soon as you insert a line, so this tool does it in one step. Zero-padding (01, 02 … 10) or right-alignment keeps the text lined up once you pass 9 or 99. Steps of 10 leave room to insert lines later, as old BASIC programs did. Leaving blank lines unnumbered keeps paragraphs readable and the count continuous: in the recipe example, the five steps are numbered 1 to 5 across the gap. Removal does the reverse, stripping leading numbers in formats such as 1., 02), [3] and (4) from text copied out of PDFs, numbered lists or code listings. For proper legal pleadings or screenplays, use the line-numbering feature in your word processor, which keeps numbers in the margin when the text reflows. Honest limits: removal can't tell a list number from a line that genuinely starts with a number, so "3 eggs" loses its 3. Check the result before using it. The text cleaner, add prefix/suffix and find and replace are related.

Frequently asked questions

How do I add line numbers to text?

Paste the text here and every line is numbered. Choose the start number, step, format and padding, then copy the result.

Can I skip blank lines?

Yes. Blank lines are left unnumbered by default so the count runs continuously through paragraphs.

How do I remove line numbers?

Switch to Remove numbers. Leading numbers like 1., 2), [3] or (4) are stripped from each line.

Is my text stored?

No. Everything runs in your browser and nothing is stored or sent.