Add line numbers to text
Add line number to each row of text. Prefix/Suffix option as well as custom formatting
Your text is processed in your browser and never sent to our server.
0 characters · 0 words · 0 lines
How to use the line numbering tool
Simply copy your text into the first text area. Numbered lines will appear in the second text area. If you are happy with the result, click on the Copy button to save the numbered lines to your clipboard. If you need to make some adjustments, you can choose to place the number before or after the line. You can also add your own characters before or after the number. By default, the numbering starts from 1.
There are additional checkboxes to help you with formatting. If you want to include empty lines in the numbering, uncheck the 'Do not count empty lines' checkbox. If you want to remove the space between the number and the line, uncheck the 'Space between number and text' checkbox. Need numbers of equal width (01, 02 … 10)? Check 'Pad with leading zeros'.
More about line numbering
How can I add line numbers to text?
Do you have a large array of items that you want to number, but don't have the time or patience to do it manually? If so, we can help you with that.
This tool can easily number lines from your text. Simply copy & paste your items into the left text area and see the result on the right side.
How can I change the format of line numbers?
The line numbering tool can be customized to meet your needs. Once you have pasted your text, you are free to change any settings located above the text areas on the fly. The result will be recreated each time you change a setting or the left text area where your original text lies. Let's look at some of the customizations that are possible.
Above the text areas you can find the settings that can be changed. We have provided default conventions for you, but you are free to customize any of them. The settings are also saved in the page address, so you can bookmark or share your favourite format.
Changing the position of line numbers
You can easily change the number position with the first setting, 'Number position'. There are two possible options: one to place the line number before the line starts (on the left side of the line) or at the end of the line (on the right side).
Changing the starting number
You are free to customize the starting number by changing the value of the 'Starting number' input. If you need to start from zero, simply change the default value of 1 to 0. If you need to set a specific offset, for example, start from 200, just change the desired starting value.
Adding something before the number
If you want to add some custom characters before the number (regardless of whether it is at the start or the end of the line), you can fill in the 'Add before number' input. For example, if you want to add three dashes in front of the line number, just add '---' followed by a space to the input. This will generate the desired output: '--- 1. Lorem ipsum dolor a si met'.
Adding something after the number
If you are not okay with the dot after the line number, you are free to customize this value in the 'Add after number' box. You can simply change the dot to something else, such as ')' or ':', or not include any character after the line number.
Do not count empty lines
If your input contains empty lines without values that you do not want to count, you can turn on this checkbox. The checkbox is turned on by default because many people need this use case. But if you want to include empty lines in the numbering, you are free to turn off this setting.
If you need to remove empty lines from your text, we have tools for that. Try our Empty lines remover tool.
Removing the space between the line number and the line
By default, we add an empty space between the line number and text, for example, '1. lorem'. You can turn this off by clicking on the 'Space between number and text' checkbox.
Working with line number results
Once you have converted your text to line numbers, you can simply click on the 'Copy' button located below the right text area. This will copy your result to the clipboard, making it easy to paste wherever you need it. You can also download the result as a .txt file.
Word and line counter
Not sure how many lines or words your text contains? Try our word counter tool for an accurate count.