About the Add Line Numbers to Text
A numbered list makes it easier to refer to a particular line in code, a poem, a contract, a transcript or a set of instructions. This tool adds a number in front of every line of text you paste. You choose the number to start at, the step between numbers, the separator that follows each number and whether to line the numbers up with spaces. Blank lines can be left unnumbered, so a list with gaps still counts correctly. The result is plain text that you can copy into an email, document or code review, and it never leaves your browser.
Updated October 2026
How to use the Add Line Numbers to Text
- 1Paste your text with one item per line.
- 2Set the first number and the step. Use 10 and 10 for BASIC-style numbering.
- 3Pick what goes between the number and the text, such as a full stop, bracket or tab.
- 4Choose whether to align the numbers and skip blank lines.
- 5Copy the numbered text or download it.
A worked example
Paste three lines, with a blank one between the second and third. With the defaults, you get 1. for the first line, 2. for the second, an empty line, and 3. for the last. If you untick the blank-line option, the empty line receives number 3 and the last line number 4. Using a tab as the separator makes the result paste neatly into a spreadsheet, where the numbers fall into their own column.
A frequent follow-up is to remove numbers again, for example after copying a numbered listing out of a web page. The Find and Replace Text tool with a pattern for digits at the start of a line does that, and the Text Cleaner can strip leading characters. Keep the unnumbered original if you plan to edit the text later, since inserting a line into the middle of a numbered list means renumbering the rest, which this tool can redo in one click.
Where line numbers help
- Code reviews and bug reports that refer to specific lines.
- Legal drafts and contracts where clauses are quoted by number.
- Poems, songs and speeches for rehearsal notes.
- Transcripts and subtitles for reference.
- Checklists and procedures that need numbered steps.
Formatting tips
Use a full stop or bracket for lists, a tab for spreadsheets and a colon for code listings. If you need the numbers without text, for example a column of 1 to 100, paste 100 empty lines using the Text Repeater and number them with a tab as separator. The Remove Duplicate Lines tool and the Sort Lines tool are best used before numbering.
Related tools
The Add Prefix and Suffix to Lines tool puts any fixed text around each line, the Line Counter tells you how many lines you have, the Head and Tail Text tool extracts parts of a list and the Text Formatter tidies up spacing and case.
Features
- Custom start and step
- Several separators, including a tab
- Right-aligned numbers
- Skips blank lines if you wish
- Counts down with a negative step
- Copy and download
Frequently asked questions
How do I add line numbers to text?
Paste the text, leave the start at 1 and the step at 1, and the tool puts 1., 2., 3. and so on in front of each line. Change the separator if you prefer 1) or 1: or a tab.
Can I number blank lines too?
Yes. Untick Leave blank lines unnumbered and every line, including empty ones, gets a number. With the option on, blank lines stay empty and the numbering continues without gaps.
How do I start at a different number?
Change Start at. To continue a list that already reached 25, start at 26. Negative start numbers work too, as does a negative step for counting down.
What does Line the numbers up with spaces do?
It pads shorter numbers with spaces so that the text starts in the same column, for example 9. and 10. rather than 9. and 10. This works best in a monospace font.
How do I number in tens, like old BASIC programs?
Set Start at to 10 and Count by to 10. Your lines become 10, 20, 30 and so on, leaving room to insert lines in between.
Will it change my text?
No. The tool only adds a number and separator at the start of each line. Everything else, including indentation, stays exactly as you pasted it.