Remove Line Numbers
Strip leading numbers and markers from each line
Clean numbered lines back to plain text
Text copied from code listings, legal documents, subtitle files or numbered outlines often arrives with a counter glued to the start of each line. Deleting those prefixes by hand is slow and easy to get wrong. This tool removes the leading number from every line in one pass, so what you paste in as 1. First item comes out as First item.
How to strip the numbers
- Paste your text into the Input Lines box, or press Paste to pull it from the clipboard. Sample loads a small example if you want to see the behavior first.
- Decide whether to keep Also strip markers (. ) ] -) ticked. It is on by default.
- Click Remove Numbers.
- Review the cleaned text, then use Copy or the .TXT button, which saves a file named cleaned-lines.txt.
The Chars, Words and Lines counters above the box update as you type, and the Before and After panels compare the totals so you can confirm nothing else changed.
What the marker option does
With the option on, the tool removes leading spaces, an optional opening bracket or parenthesis, the digits, and any run of closing brackets, periods, hyphens, colons or spaces that follow. That covers styles such as 2), [3], (4), 05: and 06 -. With the option off, only the digits and leading whitespace are removed, so a period or bracket after the number stays behind.
Where it helps
- Reusing lines pasted from a numbered code snippet or terminal log.
- Turning a numbered to-do list into a clean list you can renumber in another program.
- Tidying transcripts or poems copied from sites that display line counters.
- Preparing text for a spreadsheet column where numbering would be noise.
Things to watch for
- Every line is treated the same way. A line that legitimately starts with a number, such as 2024 budget or 3.5 mm cable, will lose those characters too (the second becomes 5 mm cable). Scan the output for lines like this.
- Leading indentation is removed along with the numbers, so nested outlines lose their indent.
- Blank lines stay in place; the tool does not delete empty lines.
- Numbers in the middle or at the end of a line are never touched.
Processing runs with JavaScript in your browser page, and the result box is plain text, so you can paste it straight into any editor.
Related Tools
Related Tools