Add Line Numbers to Text: Number Lines Online

Use this tool to add line numbers to text in seconds. Paste your lines, choose the starting number and a format like 1. or 1), skip blank lines if you like, and copy the numbered text for code reviews, scripts or lists.

Add Line Numbers

Number or un-number lines.

Everything runs in your browser. Nothing you enter or upload is sent to a server.

How to use the Add Line Numbers

  1. Paste your text or code.
  2. Choose the start number, step and separator.
  3. Tick zero padding or skip blank lines if needed.
  4. Copy the numbered text, or switch to Remove numbers to strip them.

How it works

Each line gets the current number followed by the separator, and the number grows by the step. Zero padding makes all numbers the same width so columns line up. Remove mode deletes a leading number and its punctuation from every line.

Example

"apples, bananas, cherries" on three lines becomes "1. apples", "2. bananas", "3. cherries".

Frequently asked questions

Can I start from 0 or 100?

Yes, set any start number.

Can I remove line numbers from code I copied?

Yes, choose Remove numbers.

Is there a line limit?

No practical limit; it runs in your browser.

See also: Remove Duplicate Lines and Sort Lines, Remove Line Breaks.

Number your lines

How to use it

  1. Paste your text.
  2. Set the start number.
  3. Pick a format.
  4. Copy the result.

More questions

Can I skip blank lines?

Yes. Turn on the skip blank lines option to number only lines with text.

Can I remove numbers later?

Yes. Paste your numbered text and choose remove to take the numbers out.

Is my text uploaded?

No. Everything stays in your browser on your device.

Related tools: Remove Duplicate Lines and Sort Lines, Text Repeater, Remove Extra Spaces.

Numbering a list in steps of 1 and 5

Paste your lines, set the start number, the step and the separator, then copy the numbered text. To count the lines and words in your list, use the Word Counter.

Worked example: apples, bananas and cherries become 1. apples, 2. bananas, 3. cherries with the default settings. With a start of 5, a step of 5 and a ") " separator they become 5) apples, 10) bananas, 15) cherries.

More answers

How do I number lines in steps of 5?

Set the start to 5 and the step to 5. Three lines then show 5, 10 and 15, and the tool reports 3 lines numbered.

How do I get a 1) 2) 3) style instead of 1. 2. 3.?

Choose the ") " separator. Apples, bananas and cherries become 1) apples, 2) bananas and 3) cherries.