This page removes empty lines from pasted text. A blank line is a line with nothing on it, including a line that holds only spaces or tabs. Choose whether runs of empty lines collapse to one gap or disappear completely, and the cleaned text replaces the input in the output box.
It is for the mess that arrives with a copy from a PDF, a spreadsheet column or a CMS field: paragraph breaks doubled, stray whitespace lines between list items, three blank lines where one was meant. It does not reflow paragraphs or touch the words themselves.
Three modes, one difference
One gap collapses a run of blank lines to a single empty line. Paragraphs stay separate and lists keep breathing room. No blank lines removes every empty line, so the output is a continuous block with one line per non-empty line. Trim only leaves the line structure alone and removes leading and trailing spaces from each line.
The trim checkbox is on by default. In the two removal modes it also strips spaces from the start and end of every kept line, so an indented list comes out flush left. Turn it off when the indentation is meaningful, such as a nested outline or a code sample.
Whitespace-only lines count as empty. A line holding three spaces and a tab is removed in both removal modes and is not treated as a paragraph. That is usually what you want, and it is the reason a page that looked spaced out in a word processor can lose more lines than the visible blank ones suggest.
A worked example
Eleven lines were pasted: three short paragraphs separated by runs of blank lines, with one line containing only spaces. The same input was run through each mode.
| Mode | Lines before | Lines after | Blank lines removed |
|---|---|---|---|
| One gap | 11 | 5 | 6 |
| No blank lines | 11 | 3 | 8 |
The input held eight empty or whitespace-only lines. One gap kept two of them, one between each pair of paragraphs, and removed six. No blank lines kept none and removed all eight, leaving the three text lines. The character count differs by mode as well, because the gap that survives is a character in the output.
The third run used trim only on four lines, one of them whitespace-only. The status read Removed 0 blank lines, the checklist said No empty lines found, and the line count stayed at four. Both messages are misleading in this mode: the blank line was deliberately left alone, and the page counts only removals, so zero removals is reported as nothing found. The stats told the truth: four lines before, four after, and seven characters saved from trimming the ends.
What the counts mean
Lines before is every line in the paste, including the last one if the text ends with a line break. Lines after is the number of lines in the cleaned output. Characters saved is the difference in length between the raw input and the result, so it includes removed spaces as well as removed line breaks.
Blank lines removed is the difference between the number of empty lines before and after, not the number of line breaks deleted. In one-gap mode some empty lines survive as paragraph gaps, which is why the figure is lower than the drop in the line count might suggest.
The original input is not modified. You can switch modes, compare the output, and copy or download the version you want. The download is a plain .txt file named clean-text.txt.
Where it stops
The tool works line by line. A paragraph that has been hard-wrapped by an email client keeps its line breaks, because every one of those lines contains text. If you need to join wrapped lines into a paragraph, this is the wrong tool; it would need a rule about sentence endings and hyphenation that a blank-line remover cannot guess.
It also cannot tell a deliberate blank line from an accidental one. Poetry, address blocks and code rely on empty lines, and no rule can distinguish those from a paste artefact. Check the first and last few lines of the output before replacing the source.
There is no fixed input limit, but the work happens in the browser tab. Very large pastes, in the hundreds of thousands of lines, will depend on the device's memory. For a log file or a full database export, use a command-line tool or the log file analyser, which is built for that shape of data.
For invisible spacing that is not a blank line, such as double spaces between words, tabs inside a sentence or a non-breaking space before a comma, use the extra space remover. The two pages solve different halves of the same copy-paste problem.