TTKTheTextKit

Line Numbering Tool

Paste your text and add a number to the start of every line. Start at any whole number, including 0 or a negative, and count by any step. Choose the separator (1. or 1) or 1 - or a tab), write the numbers as digits, letters or Roman numerals, line them up with spaces or zeros, leave blank lines unnumbered, or start again from 1 after each blank line. It suits steps in a guide, agenda items, code shared in a review, and clauses in a document.

Separator

Related Tools

[3 suggestions]

Guides for the Line Numbering Tool

About the Line Numbering Tool

The tool adds a number and a separator to the start of each line. By default every line is numbered from 1 and blank lines are numbered too, which is what the Unix command cat -n does. Tick the box for blank lines and they get no number and are not counted, which is what cat -b does and also the default of the POSIX nl command. A line of spaces counts as blank in this tool. The start and the step can be any whole number, so you can begin at 0, count down with a step of -1, or number by tens. A step of 0 is treated as 1. The separator can be a period, a bracket, a dash, a colon, a bar or a tab. Numbers can be written as digits, as letters (a, b, c, then aa, ab, as in a spreadsheet column), or as Roman numerals up to 3999; a number that a style cannot write, such as 0 or a negative, is shown in digits. To line up the text, pad numbers with spaces or with zeros to the width of the largest number. Starting again after each blank line numbers every paragraph or block from the first number. The line ending of your text, Windows or Unix, is kept, and so is a final line break. Everything runs in your browser and your text is never uploaded.

Can I start from 0 or a negative number?▾

Yes. The start can be any whole number, including 0 and negative numbers, and the step can be negative to count down. A start left empty falls back to 1.

Does it number blank lines?▾

By default every line is numbered, including blank ones, so the numbers match the line numbers of the text. Tick the box for blank lines to leave them unnumbered and uncounted. A line that holds only spaces counts as blank.

How do I line up the numbers?▾

Choose spaces to right-align them, so 9 and 10 end in the same column, or zeros to write 09 and 10. The width is that of the largest number, so a list of 120 lines is padded to three digits.

Can I number with letters or Roman numerals?▾

Yes. Letters run a to z, then aa, ab and so on. Roman numerals run from I to MMMCMXCIX (3999). A number that the style cannot write, such as 0 or a negative, is shown as digits instead.

How do I number each paragraph from 1?▾

Tick the box to start again after each blank line, and the one to leave blank lines unnumbered. Each block of lines is then numbered from the start number.