Number the lines of a text

Add an aligned number in front of each line of a text, useful for referencing lines in a code review, a log excerpt or a shared document.

Example:

How it works

Each line of the text gets an increasing number starting from the chosen start number, followed by a period and then the original content of the line. Numbers are right-aligned to a fixed width so that all lines stay visually aligned, even when the text has more than 9 or 99 lines. This is handy for citing specific lines in a code review or for presenting an excerpt of a log file.

Can I start numbering at 0?

Yes, just change the "Start number" to 0 (or any other value) before clicking "Number".

Are empty lines numbered too?

Yes, every line of the original text, including empty lines, gets its own number so that the output matches the source text exactly.

100% local processing: your text never leaves your browser, and the numbering is done entirely via WebAssembly on your device.