Remove line numbers
Strip the numbering off a pasted list or a copied code gutter.
The leading numbers have to run 1, 2, 3 — or 320, 321, 322 — before anything is removed, so a line starting with a year or a price is left alone. A number followed by . ) : ] or just a space is stripped. 1.1 stays, because an outline number is not line numbering. Indentation shared by the numbered lines is kept, so code copied with its gutter keeps its shape. Up to 200,000 characters.
Result
Start typing and the result appears here. No button needed.
Remove line numbers, without the extra steps.
Code copied from a documentation page or a diff often arrives with its line numbers attached, and a pasted list carries its own 1., 2., 3. Strip that numbering back off while the text itself, including the indentation the numbered lines share, stays exactly as it was. By default nothing is removed unless the numbers actually count up.
How to use this tool
- 1Paste the numbered lines. Your original stays visible above the result.
- 2Choose the numbering style, and whether only numbers that count up are stripped. The result updates automatically.
- 3Check how many numbers were removed and the range they covered, then select Copy result.
When Remove line numbers is the right tool
- A snippet copied from a documentation page or a tutorial brought the gutter's line numbers with it, and pasting it into an editor would break every line.
- A numbered list from a document has to become plain items again before it goes into a spreadsheet column or a script.
- A colleague pasted a numbered listing into a ticket and you need the code back, with its nesting intact rather than flattened to the left margin.
- A price list starts each line with a year or an amount, and stripping those numbers would destroy the data — so the tool has to refuse.
Counting up is what makes a number line numbering
A line that begins with a number is not necessarily a numbered line. `2001. A Space Odyssey`, `1999. The Matrix`, and a column of prices all start with digits, and removing them would quietly destroy the content. Real numbering counts up by one, whether it starts at 1 or at 320. The default mode checks that before touching anything and names the line where the count breaks, so refusing to strip is a visible decision rather than a silent no-op. Every match is there for the lists that are genuinely out of order.
The gap after the number is not always padding
When code is copied with its gutter, what follows each line number is the code's own indentation, and the amount differs per line. Removing all of it would flatten a nested block to the left margin. Only the whitespace width that every numbered line shares is removed, so `320 function` and `321 return` come back as `function` and ` return` with the nesting intact. Padding in front of the numbers, which right-aligns 9 under 10, is removed with the number itself.
What is deliberately not treated as numbering
A number needs whitespace after it to count, which keeps `1.1 Introduction` and other outline numbering intact — those digits are structure inside the text, not a prefix. Bullets such as -, *, and • are not numbers and are never touched. A line whose entire content is a number and a dot is treated as a numbered blank line and becomes empty, which is exactly what round-trips output from Add line numbers back to the original text.
A few quick answers.
In the default mode the leading numbers must count up — 1, 2, 3 or 320, 321, 322 — before anything is stripped. That is what stops a line beginning with a year, a price, or a quantity from losing its number. The workspace names the line where the count breaks; choose Every match to strip those numbers anyway.
No. When code is copied with its gutter, the gap after each number contains the code's own indentation. Only the width that every numbered line shares is removed, so a nested block keeps its relative indentation. The numbers, their delimiter, and any padding in front of them go.
Any style covers a number followed by a dot, a bracket, a colon, a square bracket, or nothing but a space. The other choices are deliberately narrow: pick 1. or 1) when a document mixes styles and only one of them is line numbering that should go.
The style and the counting rule apply to the whole input, so paste only the region you want changed if the rest must stay untouched. In practice the counting rule does most of that work already: a numbered block inside otherwise plain prose is the case it handles, and unnumbered lines are passed through unchanged.
Yes for text this tool produced with a consistent style: numbers, delimiter, padding, and the shared gap come off, and a numbered empty line becomes empty again. Text that was numbered by hand with mixed styles or inconsistent spacing may need Any style, and the summary tells you how many numbers were actually removed.
A restart breaks the count, so the default mode strips nothing and names the line where it happens — usually the first line of the second list. Split the two lists and run them separately, or choose Every match once you have checked that no line's number is part of its text.