Add Line Numbers

Number every line with your start, step and separator.

Options

The result updates as you type. Ctrl + Enter numbers now.

Numbered text

How to add line numbers

Paste your text into Your text, or press Load example. Every line is numbered instantly using your Start, Step, Separator and Pad width options. Copy the result or download it as a .txt file. Everything runs in your browser, so nothing you paste is uploaded.

Examples

InputOutput
First item 1. First item
First item Second item 1. First item 2. Second item
a b 1. a 2. 3. b

Limits and edge cases

  • Every line is numbered, including empty lines.
  • Windows \r\n line endings are normalized to \n in the output.
  • Zero-padding keeps the minus sign in front: -5 padded to width 4 becomes -005.
  • Start and step are whole numbers clamped to ±1,000,000,000; a step of 0 is treated as 1. Pad width is clamped to 0–10.
  • Type \t in the separator for a tab and \\ for a backslash.

Frequently asked questions

How do I add line numbers to text?

Paste your text into the input box, pick a start number, step and separator, and the numbered version appears instantly. Copy it or download it as a .txt file.

Can I start numbering from 0 or a negative number?

Yes. The start can be any whole number up to plus or minus one billion, including 0 and negatives. The step is added for each following line.

What separators can I use?

Any text, such as a dot and space, a parenthesis, a colon or a tab. You can type \t for a tab and \\ for a backslash.

How does zero-padding work?

Set a pad width such as 3 and line 1 becomes 001. Negative numbers keep the minus sign in front, so -5 padded to width 4 becomes -005.

Are empty lines numbered?

Yes, every line gets a number, including empty ones. Windows \r\n line endings are normalized to \n in the output.

Is my text uploaded anywhere?

No. Numbering runs in your browser with JavaScript and nothing is sent to a server. Inputs under 200 KB are kept in your browser's local storage so they are still there when you come back.