Add Line Numbers to Text
Number every line of text, with control over format and start.
Add Line Numbers
Instant online text processing
What does Add Line Numbers do?
Add sequential numbers to each line of text, with options for the starting number, separator, zero padding and whether to skip blank lines. Useful for referencing lines in review, documentation and support tickets.
How to Use Add Line Numbers
- 1Paste your textOne item per line.
- 2Set the formatStarting number, separator and padding.
- 3Copy the numbered textReady to paste into a document or ticket.
Key Features
- Custom starting number and increment
- Choice of separator: dot, bracket, colon, tab or custom
- Zero padding aligned to the total line count
- Option to skip or still number blank lines
- Reverse mode that strips existing line numbers
Frequently Asked Questions
Can I start numbering from something other than 1?
Yes. Set any starting number, which is useful when continuing from a previous block or matching line numbers from a specific file offset.
What is zero padding for?
Alignment. With 120 lines, padding to three digits makes 001 through 120 line up in a monospaced font, so the text does not stagger.
How do I remove existing line numbers?
Switch to remove mode. It strips a leading number and its separator from each line, which is how you clean up code pasted from a viewer that included them.
Should blank lines be numbered?
For code review, yes — the numbers must match the file. For lists, usually not. Both behaviours are available.
Everything you paste stays in this page. Text tools run as JavaScript in your browser, so nothing is uploaded, logged or stored.
Related Tools
Sort Lines
Sort a list alphabetically, numerically, by length or randomly.
Remove Duplicate Lines
Strip repeated lines from a list, with a count of what went.
Text Cleaner
Strip formatting, HTML, smart quotes and invisible characters.
Find and Replace Text
Search and replace across text, with regular expression support.
