Add Line Numbers

Number every line of a list or block of text. Choose the position, starting number, prefix and suffix, and copy the numbered result. Runs entirely in your browser.

Your text

Paste the lines you want to number

Numbered text

Result

Lines before
0
Lines numbered
0
Last number
0

What is a line number generator?

A line number generator adds a running number to the start or the end of every line in a block of text, so a list, a log or a code snippet can be referenced line by line.

The numbering runs in your browser and the text is never uploaded. You control where the number goes, which number it starts from, and what characters wrap it, such as a dot, a bracket or the word Line.

How to add line numbers

  1. Paste the list, log or text you want to number, one item per line.
  2. Choose whether the number goes on the left or the right of each line.
  3. Set the starting number, and change the prefix and suffix if you want a format such as [1] or 1:
  4. Turn on Zero-pad numbers to align single and double digits, and Skip empty lines to leave blank lines unnumbered.
  5. Press Add line numbers, then copy or download the result.

Line numbering examples

Number on the left

apple
banana
cherry
1. apple
2. banana
3. cherry

Number on the right

apple
banana
apple 1.
banana 2.

Zero-padded from 98

alpha
beta
gamma
[098] alpha
[099] beta
[100] gamma

UrsaKit vs other line number tools

DimensionUrsaKitTextMechanicText editor macro
PriceFreeFree with hourly task limitFree
Number positionLeft or rightLeft or rightManual
Prefix and suffixFree textFree textManual
Zero paddingToggleToggleManual
Skip empty linesToggleNoManual
Uploads your textNoNoNo
FAQ

Frequently asked questions

Is the tool free?

Yes. It is free, needs no account and has no hourly limit.

Is my text uploaded?

No. The numbering runs in your browser with JavaScript, so the text stays on your device.

Can I number only some lines?

The tool numbers the lines you paste. Turn on Skip empty lines to leave blank lines unnumbered, or remove the items you do not want before pasting.

What does zero-padding do?

It adds leading zeros so every number has the same width, for example 001, 002 and 010 instead of 1, 2 and 10.

Can I start from a number other than 1?

Yes. Set Start at to any number, including 0, and the count begins there.

Does it change the text on each line?

No. It only adds the number token to each line; the line content itself is copied exactly.

All Tools