About the Add Line Numbers
Number a list of names, a poem, lines of code or a script so people can refer to “line 12”. You can also strip numbers that came with text copied from a PDF or website.
Line numbers make it easy to discuss a text: “see line 14” is clearer than “the paragraph about prices”. They are used for poems and scripts in class, legal drafts under review, code snippets in documentation and lists that need numbering. This tool adds numbers to every line in one step and gives you full control over how they look.
Set the starting number and the step, choose a separator such as “. ”, “) ” or a tab, and turn on zero-padding so all numbers have the same width. Skip empty lines to number only lines with content. The tool works the other way too: tick “Remove existing numbers instead” to strip numbers from text copied from PDFs, websites or code listings.
How to use the Add Line Numbers
- 1Paste your text.
- 2Set start number, step and separator.
- 3Copy or download the numbered text.
Key features
- Custom start number and step.
- Any separator, including tabs.
- Zero-padding for equal width.
- Skip empty lines.
- Remove existing line numbers.
Practical uses
- Numbering lines of a poem for a literature class.
- Preparing a script or transcript for review.
- Adding numbers to code for documentation.
- Cleaning numbered code copied from a tutorial.
- Marking up a contract draft so reviewers can cite exact lines.
Example
Starting at 10 with a step of 10 and the separator “ ” turns three lines into “10 PRINT”, “20 INPUT” and “30 GOTO”, the classic BASIC style.
Tips and common mistakes
- Use a tab separator if you will paste into a spreadsheet, so numbers go into their own column.
- Turn on zero-padding when the list will be sorted as text.
- Check removal results on lines that genuinely start with numbers, such as years.
Limitations
- Removal only recognises common number formats at the start of each line.
- Wrapped lines in a word processor count as one line.
Privacy
Your text is numbered in the browser and never uploaded.
Frequently asked questions
Can I number only non-empty lines?
Yes. Turn on “Skip empty lines” and blank lines keep no number.
How do I remove line numbers?
Tick “Remove existing numbers instead”. Numbers like “1.”, “2)”, “03:” or “4 |” at the start of each line are removed.
What does zero-padding do?
It makes every number the same width (01 … 10), which keeps columns tidy and sorts correctly.
Can I download the result?
Yes, as a .txt file, or copy it to the clipboard.
Can I count down?
Yes. Enter a negative step such as -1 and a start of 10, and the lines are numbered 10, 9, 8 and so on.