EthicalFusion

Add Line Numbers

Number every line of your text automatically.

Was this tool helpful?

Thanks for the feedback!

Add Line Numbers puts a number in front of every line of your text, in the form "1. ", "2. ", "3. " and so on. Paste a list, a poem, a block of code or a set of instructions, press Add numbers, and copy the numbered version.

Exactly how lines are numbered

  • Numbering starts at 1 and goes up by one for each line.
  • Each number is followed by a full stop and a single space, then the original line exactly as it was, including any indentation.
  • A "line" ends wherever you pressed Enter. A long sentence that merely wraps on screen is still one line and gets one number.
  • Empty lines are numbered too. A blank line becomes "3. " with nothing after it.
  • A line break after the last line creates one more, empty numbered line at the end.

Example: an attendance list

Input:

Aarav
Diya
Kabir
Meera

Output:

1. Aarav
2. Diya
3. Kabir
4. Meera

If the same list had an empty line between Diya and Kabir, the output would contain "3. " on its own and Kabir would become number 4. To avoid that, run the text through Remove Empty Lines first, then number it.

Where numbered lines help

Referring to a specific line

When you share a code snippet, a contract clause or a draft in chat or email, numbers let the other person say "change line 7" instead of quoting it. Reviewers of poems and scripts use line numbers for the same reason.

Lists in WhatsApp, SMS and plain-text email

Messaging apps do not auto-number lists. Numbering a guest list, a to-do list or quiz questions before sending makes replies like "I will bring item 4" unambiguous.

Markdown and documentation

The "1. " format is valid Markdown syntax for an ordered list, so numbered output pasted into a Markdown editor, a GitHub README or a notes app that understands Markdown renders as a proper numbered list.

Things the tool does not do

  • It always starts from 1; there is no option for a different starting number or a different separator such as ")" or a tab.
  • Numbers are not padded, so after line 9 the text shifts one character to the right ("9. " versus "10. "). For code where alignment matters, most code editors show line numbers in the margin instead.
  • It does not renumber a list that already has numbers; it adds new numbers in front of the old ones.
  • It does not sort or remove duplicates. If your list needs that, use Text Sorter A–Z or a duplicate remover before numbering, since numbering should always be the last step.

Frequently asked questions

How do I number every line of text at once?
Paste your text and press Add numbers. Each line gets "1. ", "2. " and so on at the start, and you can copy the result.
Why is there an extra number at the end with no text?
Your text ended with a line break, which creates an empty last line, and every line gets a number. Delete the final line break and run it again.
Can I skip blank lines when numbering?
The tool numbers every line, blank or not. Remove empty lines first if you want the numbers to cover only lines with text.
Can I start numbering from a number other than 1?
No, numbering always begins at 1 and uses the "1. " format.
Will the numbered list work in Markdown?
Yes. "1. item" is standard Markdown for an ordered list, so the output renders as a numbered list in Markdown editors.

Related tools

People also used

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.