Add line numbers
Number every line your way: start, step, style and padding. Ctrl+C copies the result.
PrivateNo uploadsRuns in your browserRecipe
Line numbers
How to add line numbers
Paste your lines
Paste steps, a list, a script or code, or open a file.
Choose the numbering
Pick the style, the first number and the step. Pad with zeros to get 01, 02, or with spaces to line the text up.
Copy the numbered text
Copy or Download. Remove the step any time to get the plain lines back.
Good to know
- Skip blank lines leaves empty lines unnumbered, so the count follows your real items.
- The tab style pastes into a spreadsheet as two columns: the number and the line.
- Add Empty lines before this step to number a list with gaps in it as one clean run.
- Big files are fine. Drop a text file of 50 MB or more: the work happens in the background, the page stays smooth, and Download saves the full result.
Where people use it
Code to share
Number code lines so others can point to line 12.
Lists for print
Number a guest list, a shopping list or a question list.
Script or transcript
Number the lines of a script for a rehearsal or a review.
Sort before numbering
Put the list in A to Z order first.
Sort lines
Why this one
You pick the exact style and starting number, so it fits a list, a script or code.
- Many styles such as 1. or 01) or [1].
- Choose where to start.
- Runs on your device.
What you can change
- Start number
- Number style
- Zeros in front
- Count blank lines or not
People find this page by searching
- add line numbers to text
- number lines online
- add numbers to list
- line numbering tool
- add line numbers to code
- number each line
Cite this tool
- APA
sdev.in. (n.d.). Add line numbers to text [Web tool]. https://www.sdev.in/tools/add-line-numbers
- MLA
"Add line numbers to text." sdev.in, https://www.sdev.in/tools/add-line-numbers.
- Chicago
sdev.in. "Add line numbers to text." https://www.sdev.in/tools/add-line-numbers.
- BibTeX
@misc{sdev-add-line-numbers, title = {Add line numbers to text}, author = {{sdev.in}}, howpublished = {\url{https://www.sdev.in/tools/add-line-numbers}}, note = {Web tool} }
Questions people ask
Can I start from a number other than 1?
Yes. Set Start to any number, and Step to count by 2, 5, 10 or more.
How do I get 01, 02, 03?
Choose Pad: Zeros. The width follows the biggest number, so 100 lines are numbered 001 to 100.
Are blank lines numbered?
Not by default. Untick Skip blank lines to number every line, blank or not.
Is my text uploaded anywhere?
No. Every step runs in your browser, on your own device. Nothing you paste or open is sent to a server or kept anywhere except this page.