Add line numbers to each line of your text with customizable starting number, separator style, and optional zero-padding for alignment.
Saved Presets is a Supporter feature.
Tool History is a Supporter feature.
Tool Notes is a Supporter feature.
Paste your text that needs line numbers.
Choose your preferred number format and separator.
Copy the numbered lines to your clipboard.
The tool splits text by line break characters (\n, \r\n, \r) creating an array of lines. Each line is then prepended with a sequential number starting from your configured start value. The enumeration uses a simple counter that increments by 1 for each line, maintaining order even for blank lines.
When zero-padding is enabled, the tool calculates the maximum number length (e.g., for 100 lines, max length is 3 digits). Each number is then padded with leading zeros using String.padStart() to match this length. For example, with 100 lines: 1 becomes 001, 10 becomes 010, 100 remains 100. This ensures perfect vertical alignment in monospace fonts.
After the (optionally padded) number, the tool adds your chosen separator before the line content. Separators can be period + space (1. ), colon + space (1: ), parenthesis + space (1) ), a tab character for importing into spreadsheets, or any custom text you specify. The original line content remains completely unmodified.
All line numbering happens instantly in your browser using array mapping and string concatenation. The tool handles large files (up to 100,000 lines) efficiently. No server communication occurs - completely client-side for instant results and complete privacy.
You can customize the starting number (default is 1), choose from various separator styles (period, colon, parenthesis, tab, or custom), and enable zero-padding for aligned numbers.