About this tool
Number lines for code reviews, legal drafts or lists. Use 'Remove numbers' to clean up code copied from a site that included line numbers.
Adding and removing line numbers cleanly
Line numbers make it much easier to talk about specific parts of a text. In a code review, pointing to 'line 42' is clearer than describing where a problem sits. Lawyers and editors number lines in drafts so comments can refer to exact passages. Teachers number lines in poems and passages for classroom discussion, and support teams number steps in instructions so customers can say exactly where they got stuck.
This tool adds numbers to every line in one step. You can choose the starting number, which helps when you are numbering a section that continues from an earlier part, and decide whether blank lines should be numbered or skipped. Skipping blank lines keeps the numbering tight in prose, while numbering every line keeps it aligned with a code editor or a printed document. You can also pick the separator after each number and pad numbers with zeros so they line up neatly.
The reverse job is just as common. Code copied from tutorials, forums and documentation sites often arrives with line numbers attached, and pasting it straight into an editor produces errors. Use the remove option to strip those numbers and leave the code clean and ready to run. Check the first few lines afterwards, because some sites add extra symbols or spaces after the numbers that may need a quick trim. For formal documents, consider whether the numbers should be part of the text or added by your word processor's line numbering feature, which keeps them separate from the content. Everything happens in your browser, so drafts and proprietary code are never uploaded or stored.
How to use it
- Paste your text into the input box, or open a file from your device.
- Adjust the options. The result updates instantly.
- Copy the result, or download it as a file where offered.
Questions
Can I start from a number other than 1?
Yes. Set the start number.
Are blank lines numbered?
By default, yes. Switch on 'Skip blank lines' to number only lines with text.
Last reviewed 16 October 2026.
