Add Line Numbers

Need to strip numbers instead? Remove duplicate lines

About Add Line Numbers

Numbers every line. Paste, click, done — starting number, what follows the number, and zero padding are all adjustable.

The settings that actually matter:

Skipping empty lines is on by default. With it off, blank lines consume numbers too, so paragraph spacing stretches the numbering apart — line 3 and line 5 look adjacent on screen, and referring to "between lines 3 and 5" becomes nonsense.

Zero padding exists for sorting. Without it 9 sorts after 10 in a string comparison; 09, 10 is the order filenames need. Timecodes, chapter numbers and batch-exported filenames all depend on it.

Choosing a tab after the number makes the result pasteable into a spreadsheet. Tab-separated, Excel and Google Sheets split it into a number column and a text column without any manual splitting.

The starting number can be anything, including 0 and negatives — useful when continuing an existing list.

Understand that this is text numbering, not automatic numbering. Once added, the digits are part of the content: delete a line in the middle and the numbers below do not shift. That behaviour belongs to Word's list feature or your editor's line numbers, not to this tool.

Line endings are normalised to LF. A textarea's value is always LF by spec, so CRLF pasted in is converted the moment it lands — no browser tool can preserve it. If the target really needs CRLF (a .bat file, old Notepad), save it and convert in an editor.

Everything runs in the browser; nothing you paste is uploaded.

Frequently asked questions

Why are empty lines skipped by default?

Blank lines consuming numbers makes the numbering disagree with what you see. Untick the option to number every line.

Can numbers be padded like 001?

Yes. Choose 3 digits to get 001, 002 — which is what filenames and lists need to sort correctly.

Can I paste this into Excel as two columns?

Yes. Pick tab after the number and the spreadsheet splits it into a number column and a text column.

If I delete a middle line, do the numbers re-flow?

No — the numbers are part of the text now. Number it again, or use Word's list feature for automatic numbering.

Are my line endings changed?

They are normalised to LF — a textarea value is always LF, so CRLF is converted as it lands.

Related tools

Text View all ›