Lines, blank lines, unique lines and the longest line
Add or Remove Line Numbers
Number lines for a script, a legal draft or code you are sharing, or remove numbers from something you copied.
Loading tool…
How to use add or remove line numbers
Paste your text.
Choose Add numbers or Remove numbers.
To add, set the start, step, format (1. or 1) or tab) and padding.
Copy or download the result.
What this tool does
- Any start number and step, including counting down.
- Six formats, padding with zeros or spaces so numbers line up.
- Can leave blank lines unnumbered.
- Removes numbers such as "12.", "12)", "12:", "12 |" or a number and a tab from the start of lines.
How the result is verified
When you add numbers, the tool removes them again and compares the result with your text; a match proves the numbering added nothing else.
Frequently asked questions
Can I start at a number other than 1?
Yes. Set any start and step; a step of 10 gives 10, 20, 30, and a negative step counts down.
How do I remove line numbers from copied code?
Choose Remove numbers and paste. Leading numbers followed by a dot, bracket, colon, bar or tab are stripped from each line; lines without one are left as they are.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Flip line order, words on each line, or every character
Alphabetical, natural (file2 before file10) or by length, any language
Strip spaces and tabs from the start or end of every line