Add line numbers to text

How to Use Line Numbering Tool?

Simply copy your text into the first textarea. Numbered lines will appear in the second textarea. 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 two 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.

Did this tool help you?

We did this tool available to anyone for free. If we helped you don't forget to spread it to the world.

Share onFacebookShare onTwitterShare onLinkedin

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 textarea 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 textareas on the fly. The result will be recreated each time you change a setting or the left textarea where your original text lies. Let's look at some of the customizations that are possible.

At the top of the 'Add line numbers to text' box, below the heading, you can find settings that are possible to change. We have provided default conventions for you, but you are free to customize any settings.

Changing the position of line numbers

You can easily change the number position by clicking on the first setting, 'Number position'. There are two possible options: one to draw 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 for something else 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 result' button located below the right textarea. This will copy your result to the clipboard, making it easy to paste wherever you need it.

Word and line counter

Not sure how many lines or words your text contains? Try our word counter tool. for an accurate count.