Add Line Numbers
Number the lines of a text with a custom start value, separator and padding.
About this tool
Add Line Numbers prefixes each line with a sequential number, which makes code snippets, transcripts and lists easier to reference in reviews and discussions. Choose the first number, the separator and whether to zero-pad.
Related: Add Prefix/Suffix to Lines.
How to use it — quick steps
- 01
Enter the text
Type or paste the text in the field above. Nothing is uploaded: the text stays in your browser.
- 02
Adjust the options
Pick the settings that fit your case; the defaults work for most people. Changes apply instantly.
- 03
Press "Add line numbers"
Press "Add line numbers" or Ctrl + Enter. The result appears instantly below the form.
Key features of this tool
Nothing leaves your browser
The processing is plain JavaScript that runs on your device: the text you paste is never uploaded to our servers or to anyone else.
Instant results
Results appear the moment you press the button, even for long inputs, and every block has copy and download actions.
Works everywhere
No installation, no account and no limits: the tool works on desktop and mobile, in any modern browser, as often as you like.
Frequently asked questions
Can I number from 0 or from 100?
Yes, set any starting number.
How do I remove the numbers later?
Use Remove First/Last N Characters or a regex like ^\d+\.\s in Regex Matches Extractor.
Are my files or data uploaded?
No. The tool is plain JavaScript that runs in your browser; the files or data you provide here are never uploaded to our servers.