Add Line Numbers
Number every line of a list, script or document in one click.
How to use the Add Line Numbers
- Paste the text you want to number.
- Choose what follows each number and where counting starts.
- Skip blank lines or line up the numbers if you like.
- Copy the numbered text or save it.
Examples
About this tool
Line numbers make text easy to refer to: "see line 14" in a code review, a numbered list of steps, questions on a worksheet, or verses and paragraphs in a document you are discussing. This tool adds them to any text in one go, leaving the lines themselves untouched.
You choose how numbers look. Follow them with a full stop, bracket, colon, bar, tab or space; start from any number and count by any step; and add text in front, such as "Step" or "Q". Blank lines can be skipped so paragraphs separated by empty lines are numbered without gaps.
For code and long lists, line the numbers up with spaces or leading zeros so that line 9 and line 10 keep the text in a neat column. Choose the tab separator when pasting into a spreadsheet: the numbers land in one column and the text in the next.
Frequently asked questions
Can I number only the lines that have text?
Yes. Turn on "Skip blank lines". Empty lines stay in place but are not given a number, and counting continues on the next line with text.
How do I remove line numbers again?
Use Find & Replace with a regular expression such as ^\d+\.\s to strip a number and full stop from the start of each line.
Can numbers start at zero or count down?
Yes. Set the start to 0 for zero-based numbering, or use a negative step, such as -1, to count down.
Is my text uploaded?
No. The numbering is done in your browser as you type, so private notes and source code stay on your device.