Add line numbers
Prefix text lines with numbers using a starting index and a choice of formats, with an option to leave blank lines alone.
How it works & useful details
How to use this tool
Paste your text, choose a nonnegative starting integer and prefix format, then number the lines. Existing numbering is preserved.
How the result is calculated
Leave blank lines unnumbered preserves empty and whitespace-only lines and does not advance the counter for those lines. Otherwise, a final newline creates a final numbered blank line.
Line tools normalize CRLF and CR to LF. A final newline represents an empty final line; empty input has zero lines.
Up to 500,000 UTF-16 code units per input. Text stays on your device.
The result is limited to 2,000,000 UTF-16 code units.
