webby.tools

Add Line Numbers

Prepend a line number to every line of your text. Useful for code reviews, legal documents, numbered lists, and anywhere you need to reference specific lines. Customise the start number, separator style, and more.

Why Add Line Numbers?

Line numbers make it easy to reference specific parts of a document without ambiguity. Whether you're reviewing code with a colleague, marking up a legal contract, creating a numbered script, or preparing a worksheet, having numbered lines removes all guesswork.

This tool handles any plain text — paste in a poem, a list, a log file, or anything else and get clean numbered output in seconds.

Common Uses

  • Code review — Share code snippets with line numbers so reviewers can refer to "line 14" precisely.
  • Legal documents — Court filings and contracts often require every line of text to be numbered.
  • Poetry and scripts — Number the lines of a poem or screenplay for annotations and discussion.
  • Quizzes and worksheets — Turn a plain list of questions into a numbered set ready to print or copy.
  • Log file analysis — Adding line numbers to a log excerpt before sharing makes it easier to point to specific entries.
  • Ordered lists — Quickly convert a bullet-point list into a numbered list without reformatting manually.

Frequently Asked Questions

What does "Pad with leading zeros" do?

When this is on, all numbers are padded to the same width as the largest number. For example, if your text has 100 lines the numbers will appear as 001, 002 … 010 … 099, 100. This keeps the text columns aligned when viewed in a monospace font.

Can I start numbering from 0?

Yes. Set the start number to 0 and the first line will be numbered 0, the second 1, and so on. This is useful for zero-indexed arrays or programming examples.

What does "Skip blank lines" do?

When enabled, blank lines are left unnumbered and the counter does not advance for them. The numbering only counts non-empty lines. This is useful when your text has paragraph breaks that you want to preserve without wasting a number on the empty gap.

Related Tools

Icons from Creative Fabrica

This website may contain affiliate links. If you click on an affiliate link and make a purchase, we may receive a small commission at no additional cost to you.