Add Line Numbers
Add line numbers to any text. Formats with aligned padding and a separator — ready for code reviews, documentation, or sharing.
How to Use
- 1
Paste your text or code
Enter the text you want to number in the input area.
- 2
Click Add Numbers
Each line gets a number prefix, padded for alignment.
- 3
Copy the result
Click Copy to copy the numbered text.
What is Add Line Numbers?
This tool prepends a line number to every line in a block of text. Numbers are right-aligned and padded for consistent formatting, separated from the content by a pipe character (|). The result is ready for code reviews, bug reports, documentation, or any context where referencing specific lines is helpful.
FAQ
What format are the line numbers?
Does it number empty lines?
Can I customize the numbering format (e.g., padding or separator)?
Related Articles
Related Tools
Remove Line Numbers
Strip line numbers from text. Handles common formats: '1 | ', '1: ', '1. ', '1) ', '1] '.
Line Counter
Count lines, words, characters, sentences, and paragraphs in any text. Real-time text statistics with reading time estimate.
Diff Checker — Text Compare
Compare two texts side-by-side and see the differences highlighted. Find added, removed, and unchanged lines instantly.
Case Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE instantly.
Text Reverser
Reverse any text character by character. Handles Unicode, emoji, and multi-byte characters correctly.
Character Counter
Count characters with and without spaces, plus words, lines, sentences, and reading time. Real-time analysis for any text.