TextArray
100% local

Add line numbers

Put a sequential number in front of every line of your text.

Input
Output

Add line numbers

Paste any text and this tool puts a sequential number in front of every line. It is the quick way to turn a plain list into a numbered one — steps in a procedure, ranked keywords, test cases, checklist items, or a code snippet you want to reference by line in a review or a bug report.

Four options cover the usual formats. "Start at" sets the first number, so you can begin at 0 for zero-indexed code, or at 47 to continue where an earlier batch ended. "Separator" is the text placed between the number and the line — the default is a dot and a space, but a bracket, a colon, a tab or nothing at all all work. Padding decides how the column lines up: choose spaces to right-align the numbers, or zeros for the 001, 002, 003 style that sorts correctly in filenames and spreadsheets. The width is calculated from the largest number in the batch, so 100 lines get three digits and nothing drifts out of alignment. Finally, "Don't number empty lines" keeps blank lines between paragraphs blank instead of numbering them, which matters when you are numbering prose rather than a list.

Windows and Unix line endings are handled interchangeably, and the tally under the output tells you how many lines were numbered so you can check the count at a glance.

Everything runs in your browser. Your text is never uploaded, so internal notes, unreleased content and private lists are safe here. Copy the result, download it as a .txt file, or send it back to the input to chain another step.

FAQ

Can I start numbering at a number other than 1?
Yes. Set "Start at" to any value from 0 upwards — useful for zero-indexed code or for continuing a list that started elsewhere.
How does padding decide the width?
The width comes from the largest number in the batch. With 100 numbered lines every number is three characters wide, so 001 through 100 stay aligned in one column.
What happens to empty lines?
By default they are numbered like any other line. Turn on "Don't number empty lines" and blank or whitespace-only lines are left untouched, while the numbering continues on the next real line.
Can I use a separator other than a dot?
Yes. The separator is free text — try ") ", ": ", a tab, or leave it empty to place the number directly against the line.
Is my text uploaded anywhere?
No. The tool runs entirely in your browser and your text never leaves your device.