TC

Add Line Numbers — Free Online Tool

Last updated: January 2025

Your text is processed locally — we never store your data. Free forever, no signup.

What is Add Line Numbers?

Add Line Numbers prepends a sequential number to the beginning of each line in your text.

When to use Add Line Numbers?

Use it to number code lines for sharing in code reviews, number Bible verses, create numbered lists, and add references to any text.

How to use this tool

  1. 1Paste your text
  2. 2Choose starting number and separator
  3. 3Click 'Add Numbers' and copy the numbered output

Examples

InputOutput
apple banana cherry1. apple 2. banana 3. cherry
(Code snippet)1 int main() { 2 return 0; 3 }
(Instructions list)1. Step one 2. Step two 3. Step three
(Bible verses)1 In the beginning... 2 ...
(Lyrics)Line-numbered lyrics for easy reference

Rules & Behavior

  • Starting number configurable (default: 1)
  • Separator between number and line configurable (., :, space, tab)
  • Blank lines also get line numbers

Related Tools

Frequently Asked Questions

Can I start numbering from a number other than 1?

Yes, you can set any starting number (e.g., start from 10 for line numbers in a larger file, or start from 0).

What separators can I use?

Choose from: period (1.), colon (1:), space (1 ), tab (1\t), or a custom separator.

Does it number blank lines?

Yes, blank lines receive line numbers by default. This matches standard code editor behavior.

Can I remove line numbers later?

Yes, use our Find and Replace tool with a regex pattern like '^\d+[.:\s]+' to strip the line numbers.

Is it good for code sharing?

Yes! Numbered code makes it easy to reference specific lines in code reviews, Stack Overflow answers, and documentation.