What this tool does
How the tool works
Try it with sample text
Add line numbers to selected text in Word, Notepad++ and TextEdit
Add line numbers to a textarea or text box
Add line numbers to a text file in vim, Linux and Python
Features explained
Splits text at line breaks
The tool treats each line break as the end of a line and numbers the lines in order. This keeps the result predictable: what you see as separate lines in the input box is what gets numbered. The limit is that wrapped text without a real line break counts as one line.
Start number
Numbering begins at 1 by default. Change it when your text is a continuation, for example an excerpt that starts at line 50. The next lines count up from the number you choose.
Separator
The separator is the text placed between the number and your line, such as a period and a space, a dash, or a colon. Choose what suits the place where you will paste the result. If you leave it empty, the number sits directly against the text.
Skip empty lines
When this is on, empty lines are skipped instead of being numbered. This suits text with blank lines between paragraphs. Leave it off if every line, blank ones included, should get a number.
Pad numbers with zeros
Adds leading zeros to the numbers so they look uniform, such as 001, 002, 010. It helps in long lists, where mixed-length numbers can make the text look uneven.
Works with pasted text or a plain-text file
You can paste text directly or use a standard text file. This covers notes, lists, scripts, CSV rows, logs, and code, because they are all plain text. Formatted documents such as Word or PDF files need their text copied out first.
Runs in your browser
The numbering is done by your browser, not by a server. That means no upload and no waiting for a transfer. Very large text depends on your device’s memory.
What can you use it for?
Teaching and study
Number the lines of a poem, a speech, or an exercise so students can say “look at line 7”.
Code and log sharing
Add numbers to a snippet or a log before you paste it into a chat or an email, so people can refer to the exact line.
Editing and review
Number a draft or a script so reviewers can give feedback by line.
Legal and transcript work
Number the lines of a transcript or a list of clauses so they can be cited precisely.
Lists and data rows
Number the rows of a CSV extract or a plain list to count items or point to a specific entry.
Tool information
| Tool type | Text utility |
|---|---|
| Input | Pasted text or a standard plain-text file |
| Output | The same text with a number added to the start of each line |
| How lines are detected | Text is split at line breaks (delimiter-based) |
| Start number | Adjustable, starts at 1 by default |
| Separator | Adjustable text between the number and the line |
| Skip empty lines | Optional, off by default |
| Pad numbers with zeros | Optional, off by default |
| Processing | In your browser (client-side) |
| Server upload | None |
| Account required | No |
| Cost | Free |
Benefits
- The numbers become part of the text, so they stay when you copy, paste, or print.
- Nothing to install and no account to create.
- The text is processed in your browser, so it is not uploaded.
- Works for any plain text: lists, code, CSV rows, logs, scripts, poems.
- The result is predictable because it follows your real line breaks.
Limitations
- It numbers lines of text only. It does not edit Word or PDF files directly; copy the text out first.
- Lines are counted by line breaks, not by how the text wraps on screen.
- It does not understand code or document structure, so every line is treated the same way.
- Empty lines get a number unless you turn on Skip empty lines.
- Once added, the numbers are ordinary characters. If you want them gone later, you have to edit the text yourself.
- Very large text depends on your device’s memory because everything runs in the browser.
Privacy and security
The text you paste or load is processed in your browser and is not uploaded to our server. Because nothing is sent, there is nothing for us to store. On a shared or public computer, close the tab when you finish so the text does not stay on screen.
Tips
- If a long sentence should count as two lines, press Enter where you want the break before numbering.
- Turn on Skip empty lines if blank lines between paragraphs should not get numbers. A trailing empty line at the end of your text is also a line and can get its own number.
- Keep a copy of the original text. Removing numbers later is manual.
- For a partial selection in Word, copy only that part, number it, and paste it back.
Frequently asked questions
Is this tool free, and do I need an account?
Yes, it is free, and no account is needed. You can use it without signing up.
Is my text uploaded anywhere?
No. The text is processed in your browser and is not sent to our server.
What kind of files can I use?
Standard plain text: pasted text, or files such as .txt, .csv, .log, .md, and code files. Word (.docx) and PDF files are not plain text, so copy their text into the tool.
Does it work offline?
The page needs internet to load the first time. After that, the numbering is done in your browser, so it should keep working if your connection drops while the page stays open.
How does the tool decide where a line starts and ends?
It splits the text at line breaks. Text that only looks wrapped on your screen, without a real line break, counts as one line. An empty line is also a line and gets a number, unless Skip empty lines is turned on.
How do I add line numbers to selected text in Word?
Copy only the part you want, number it in this tool, and paste the result back into Word. Word’s built-in line numbering works on a whole section instead of a selection.
Why don’t the numbers from Notepad++ or vim appear when I copy my text?
Those numbers are shown in the editor margin for reading only and are not saved in the file. To get numbers inside the text, paste the text here.
Can I use it on my phone?
Yes, in a modern mobile browser. Paste the text, run the tool, and copy the result.
Can I change the starting number or the separator?
Yes. You can set the start number (it begins at 1 by default) and the separator that goes between the number and your text. There are also two optional switches: Skip empty lines and Pad numbers with zeros.