Add Line Numbers
Paste any text to number every line, with your own start number, step, zero padding and separator. Switch to remove mode to strip existing line numbers instead.
Removes a number at the start of each line together with a following separator such as 1., 2), 3:, (4), 05 - or a tab.
How to use the Add Line Numbers
- Paste your text into the Input text box. Each line gets its own number.
- Set the start number and step, for example start at 10 with a step of 10 for 10, 20, 30.
- Choose padding and a separator such as zeros and a period for 01. 02. 03.
- Tick Skip blank lines if empty lines should stay unnumbered.
- Press Add line numbers, then copy or download the result. Use Remove numbers mode to strip numbers from a list.
Line numbering examples
| Settings | Result for three lines | Good for |
|---|---|---|
| Start 1, step 1, period | 1. Apples · 2. Pears · 3. Plums | Numbered lists, instructions |
| Start 1, zeros, bracket | 01) … 02) … 03) (with 10+ lines) | Aligned lists that sort as text |
| Start 10, step 10, space | 10 … 20 … 30 | BASIC-style code, leaving gaps to insert lines |
| Start 0, step 1, colon | 0:… 1:… 2:… | Zero-based indexes for programmers |
| Start 5, step −1, tab | 5 → 4 → 3 | Countdowns and ranked lists |
How the numbering is calculated
Line k (counting numbered lines from 0) gets the number start + k × step. With 12 lines, start 1 and step 1 the last number is 12, so zero padding uses two digits: 01, 02 … 12. With start 8 and step 2 the numbers are 8, 10, 12 …, and padding is based on the widest number in the list.
When Skip blank lines is on, empty lines (including lines that contain only spaces) do not use up a number, so the list stays continuous: a blank line between steps 3 and 4 stays blank and the next line is still 4.
Common uses
- Number the lines of code, logs or a poem before sharing them so others can refer to “line 14”.
- Turn a plain list into a numbered list for an email, document or forum post that does not support list formatting.
- Add a tab-separated index column before pasting rows into a spreadsheet.
- Strip old numbering from copied lists so they can be re-sorted and renumbered.
Frequently asked questions
How do I add line numbers to text?
Paste the text into the input box. Every line is numbered straight away using your start number, step and separator, and the numbered text appears in the Result box ready to copy or download.
Can I start numbering from a number other than 1?
Yes. Type any whole number in Start at, including 0 or a negative number, and choose a step such as 2, 5 or 10. A negative step counts down.
What does zero padding do?
It adds leading zeros so every number has the same width, for example 01 to 12 or 001 to 150. This keeps lists aligned and makes them sort correctly as text.
How are blank lines handled?
By default blank lines are numbered like any other line. Tick Skip blank lines to leave them empty and unnumbered; the counter continues on the next line with text.
How do I remove line numbers from text?
Switch to Remove numbers. The tool strips a number at the start of each line along with a following separator such as a period, bracket, colon, dash or tab, and keeps the rest of the line.
Can I use a tab between the number and the text?
Yes. Choose Tab as the separator. This is handy for pasting into a spreadsheet, where the numbers and text land in separate columns.