Remove Empty Lines Online
Paste text with gaps in it and get it back without the blank lines — or with single blank lines between paragraphs.
Text Tools
Paste text with gaps in it and get it back without the blank lines — or with single blank lines between paragraphs.
Text copied from PDFs, emails, web pages and terminal output often arrives with blank lines scattered through it. This tool removes them instantly. Paste your text and the cleaned version appears on the right, with a count of how many lines were removed.
| Mode | What it does | Best for |
|---|---|---|
| Remove all blank lines | Every empty line is deleted, so all content lines sit together. | Lists, CSV data, keyword lists, log files, code you want compact |
| Keep one blank line between blocks | Runs of two or more blank lines become a single blank line. | Articles, emails and notes where you want to keep paragraphs apart |
A line can look blank but still contain spaces or tabs. That is common in text copied from word processors and in code where an editor left indentation behind. With Lines with only spaces count as empty switched on (the default), those lines are removed too. Turn it off if whitespace-only lines are meaningful in your data, for example in some fixed-width formats.
Trim trailing spaces also removes invisible spaces at the end of every remaining line. Trailing whitespace is a frequent cause of noisy diffs in version control and of failed exact-match lookups in spreadsheets.
Line breaks from Windows (CRLF), old Mac (CR) and Unix (LF) text are all recognised; the output uses standard LF line breaks.
Whitespace Remover, Remove Duplicate Lines, Sort Lines, Find & Replace.