Remove blank lines

Paste text full of blank lines and get the compact version in one click: we also strip lines made of nothing but spaces, and tell you exactly how many were removed.

What to clean, in the order it is done

Your text stays in your browser: nothing is saved or sent anywhere.

When you need to strip blank lines

It happens all the time: text copied from a PDF or a web page that arrives riddled with double line breaks, lists exported from Excel or a database with ghost rows, transcripts and subtitles broken mid-sentence, log files you want to compact before pasting into an email. Deleting them by hand one at a time is tedious and error-prone; here you paste everything, press one button and instantly get the compact text, along with an exact count of how many lines disappeared.

What counts as a "blank line"

Not just completely empty lines: we also remove lines that look empty but actually contain invisible spaces or tabs, the most common reason a line "just won't go away". The tool recognizes both Windows and Mac/Linux line endings, and the cleaned text uses plain line breaks, ready to paste anywhere. The content of non-empty lines is left untouched: leading and trailing spaces on lines with text stay exactly as you wrote them.

Several clean-ups at once, in a fixed order

Below the box you will find all ten clean-ups of this family, and you can tick as many as you like: each page starts with its own already ticked. The program is the same on all ten, so the same text with the same boxes gives the same result on whichever page you paste it.

The order does not depend on which boxes you tick, and it is the order you see them in: first the characters (emojis, accents, numbers, punctuation), then the spaces inside each line (tabs, indentation, extra spaces), then whole lines (blank and duplicate) and last of all joining everything into one line. So a line that is left empty once the emojis are gone disappears with the blank lines, and two lines that become identical once the spaces are gone count as duplicates.

The sister pages, each with its own box already ticked: Remove extra spaces, Remove indentation, Remove duplicate lines, Remove emojis, Remove accents, Remove punctuation, Remove numbers, Text on one line and Tabs to spaces.

Related tools