Add Line Numbers
Number every line of a text block, with a configurable starting number, separator and right-aligned padding.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Add Line Numbers tool does
The add line numbers tool on this page will number every line of a text block, with a configurable starting number, separator and right-aligned padding. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for numbering a code excerpt for a bug report or review. We run a second free tools site as well — FreeToolsWorld.org.
How to use it
- Paste your lines.
- Set the starting number and the separator you want after it.
- Numbers are right-aligned so the text stays in a straight column.
- Copy the numbered output.
How it works
Numbers are padded on the left so that a list running past nine, ninety-nine or beyond keeps its text aligned in a single column. Without padding, line 9 and line 10 start their text at different positions, which looks untidy in monospaced output.
The starting number is configurable because numbered content is often a continuation — an appendix that carries on from the main document, or a code excerpt from partway down a file.
When to use it
- Numbering a code excerpt for a bug report or review.
- Creating a numbered reference list from plain lines.
- Preparing a transcript where each line needs a citable number.
Common mistakes to avoid
- Numbering text you will later paste into a system that adds its own numbering, producing a doubled "1. 1.".
Frequently asked questions
Can I start at a number other than 1?
Yes. Set any starting number, including a negative one. The padding width adjusts to the largest number that will appear.
Can I use a different separator?
Yes — type whatever you want in the separator field, such as ") ", ": ", " | " or a tab. Leave it empty for no separator at all.