Add Line Numbers

Add line numbers to each line of text with customizable formatting. Free online tool to number lines with configurable start, separator, and padding.

0 characters0 words
Output will appear here...

Related Tools

The line number tool prefixes each line of your text with its line number. You can customize the starting number, the separator between the number and text, and whether numbers should be padded with spaces for alignment.

This tool is useful for preparing code snippets for documentation, creating numbered lists from plain text, referencing specific lines in text, and formatting text for discussion or review. It handles texts of any length instantly.

All processing is done in your browser — your text is never stored or sent anywhere.

How to Use Add Line Numbers

  1. 1Paste your text into the input area.
  2. 2Set the starting number and separator character.
  3. 3Optionally enable padding for aligned number columns.
  4. 4Click the Copy button to copy the numbered text.

Frequently Asked Questions

Can I start numbering from a custom number?
Yes. Use the 'Start number' option to set any starting value. For example, set it to 0 for zero-based numbering or 100 to continue from a previous block.
What does number padding do?
When padding is enabled, numbers are left-padded with spaces so they all have the same width. This creates aligned columns, making the numbered text easier to read — especially useful for texts with more than 9 lines.
Can I customize the separator?
Yes. The separator field lets you set any text between the number and the line content. Common choices include '. ' (period space), ': ' (colon space), ') ' (parenthesis space), or a tab character.
Does this tool handle large texts with hundreds or thousands of lines?
Yes. The tool processes text of any length instantly in your browser. When padding is enabled, the number width automatically adjusts to accommodate the total number of lines, so alignment stays consistent even for very long documents.