Add Line Numbers to Text
Add line numbers to text online with a custom start, step, zero padding and separator, or strip existing numbering. Free and private in your browser.
How to use Add Line Numbers
- 1Paste your text or open a file.
- 2Set the start number, step, padding and separator, or switch to Remove line numbers.
- 3Copy the numbered text or download it.
What makes it better
- Custom start number and step, such as counting by 5 or 10
- Zero padding to a width you choose, such as 001, 002
- Separator choices: period, parenthesis, tab or your own text
- Option to leave blank lines unnumbered
- Removes existing numbering in the same tool
About Add Line Numbers
Add Line Numbers prefixes each line with a counter that you control: where it starts, how much it grows, whether it is zero-padded and what comes between the number and the text. A second mode removes numbering that is already there, such as 1. or 003:.
Common uses
- Number the lines of a script, poem or contract so people can refer to line 14 in a review.
- Prepare a numbered list for an email or chat message from a plain list.
- Create zero-padded identifiers such as 001, 002, 003 next to a list of items.
- Clean a numbered list copied from a document so only the items remain.
Example
Input
Preheat the oven Mix the flour and sugar Add the eggs Bake for 25 minutes
Result
1. Preheat the oven 2. Mix the flour and sugar 3. Add the eggs 4. Bake for 25 minutes
Good to know
- Numbering restarts on every run; the tool does not read numbers that are already present unless you use Remove line numbers.
- Remove line numbers strips a leading number followed by a period, colon, closing bracket or tab. Decimals such as 1.5 and times such as 10:30 are left alone.
- Zero padding only adds zeros; numbers wider than the chosen width are never cut.
Add Line Numbers FAQ
How do I number lines starting at 0 or 100?
Change the Start number field. Set the Step to the amount each line should grow by, for example 10 to get 100, 110, 120.
How do I get 001, 002, 003 instead of 1, 2, 3?
Choose Zero-pad and set the width to 3. Numbers longer than the width keep all their digits.
Can I skip blank lines when numbering?
Yes. Turn on Skip empty lines and blank lines are left as they are without using up a number, so the count continues on the next real line.
How do I remove line numbers I already have?
Switch to Remove line numbers. It strips a leading number followed by a period, colon, bracket or tab, such as 1. or 003: , and shows how many lines were changed.
Does this work with Windows line endings?
Yes. CRLF, LF and CR line breaks are all recognised, and the result uses plain line feeds.