Tool guide
About this tool.
Blank lines can be removed, collapsed to one, or kept. With collapse, each run of blank lines becomes a single blank line, which keeps paragraph breaks and drops the extra gaps. Whitespace-only lines count as blank by default; turn that option off to treat only completely empty lines as blank.
Every line you keep keeps its own line ending. CRLF stays CRLF, a lone CR stays a lone CR, and a last line without a line break stays without one.
A line number is removed only in a recognized form: optional spaces or tabs, 1 to 9 digits, then a period, a closing parenthesis, a colon or a vertical bar (optionally after spaces) that is followed by a space, a tab or the end of the line, or else a tab straight after the digits. At most one following space or tab is removed. So 1. one, 2) two, 3: three, 4 | four and 5 then a tab are all cleaned, while 3.14, 10:30 and 1|2 are not.
A number followed by only a space, as in 2024 was good, is removed only when there are at least two non-blank lines, every one starts with a number and a space, and the numbers count up by one. That is how editors copy numbered code, and it keeps ordinary sentences safe.
Paste text as the main input, or select it in the editor.
Choose what to do with blank lines: Remove, Collapse to one, or Keep. Decide whether lines with only spaces or tabs count as blank.
Choose whether to Remove or Keep line numbers.
Run the tool. Copy the result, replace the selection with it, or save it as cleaned.txt.
- a, two blank lines, b → a and b on adjacent lines
- a, two blank lines, b with Collapse to one → a, one blank line, b
- 1. one → one
- 12 const a and 13 const b on the next line → const a and const b
- 2024 was good, not numbered → unchanged
- 3.14 is pi and 10:30 standup → unchanged
- Processing is local; nothing is uploaded.
- Limits: 1,000,000 characters of input.
- Line numbers are recognized only at the start of a line and have at most 9 digits.
- A delimiter must be followed by a space, a tab or the end of the line, so decimals, times and versions such as 3.14, 10:30 and 1.2.3 are kept.