Add line numbers to any text with custom start, step, prefix, suffix and padding. Skip blank lines, strip existing numbers, copy in one click.
Code review tools, diff viewers, and most text editors show line numbers in a fixed gutter — but paste that text into a chat, a document, or a ticket and the numbers vanish. Line Numbering Tool adds them back as part of the content, so a colleague reading the pasted block can refer to line 14 and know exactly which one you mean.
Beyond the basic case, four independent controls let you reshape the numbering to match whatever format the receiving end expects. A log processor may want zero-padded four-digit counters. A LaTeX listing increments by 5 so reviewers cite line 10, 15, 20. A Markdown snippet needs nothing after the number at all. Combining start value, step, prefix and suffix covers all of these without any manual editing.
Click Load Sample to paste a six-line JavaScript function. With Start at set to 1, Step to 1, no prefix, a two-space suffix, and Space padding active, the output reads:
1 function greet(name) { on the first line and 6 greet("Aria"); on the last — each number right-aligned to the same width as the highest line number.1 1 function greet….[ and set After number to ] to produce [1] line one, [2] line two.linenos style. The padding width is always computed from the largest number that will appear, so a 500-line file starting at 100 with a step of 10 pads to four digits from the first line.0 instead of spaces. Useful when the numbered output will be sorted alphabetically and numeric sort is unavailable.−1 or starting a diff at line 0 are both valid uses.Number padding
Number which lines?
Paste text above, or hit Load Sample to try a code snippet.