Remove Empty Lines
Deletes blank lines from your text so the remaining lines sit together, or keeps a single blank line between paragraphs if you prefer. It is useful for tidying text copied from emails, documents or web pages that came with large gaps.
How to use the Remove Empty Lines
- Paste your text. Empty lines are removed as you type.
- Keep Treat lines containing only spaces as empty on to remove lines that look empty.
- Turn on Keep one empty line between paragraphs to tidy spacing without joining paragraphs.
Rules applied
- Windows (CRLF), Unix (LF) and old Mac (CR) line endings are kept as they were.
- A final line break at the end of the text is kept.
Limitations
- Lines containing invisible characters other than spaces, tabs, zero-width spaces and byte order marks are not treated as empty.
Worked examples
Input
First line Second line Third line
Result
First line Second line Third line
Input
Paragraph one. Paragraph two. Paragraph three.
Result
Paragraph one. Paragraph two. Paragraph three.
Practical uses
-
Compacting a pasted list
A teacher copies a class list from a web page that has blank lines between the names. They paste it into the tool and the empty lines are removed as they type. The tight list is ready to paste into a spreadsheet.
-
Cleaning exported text
A developer receives a log export with stray empty lines between entries. They paste the log in and keep the option for lines containing only spaces switched on, so lines that look empty are removed as well. The compact log is easier to search.
-
Tidying paragraph spacing
A writer's draft has two or three blank lines between some paragraphs and only one between others. They turn on Keep one empty line between paragraphs. The paragraphs stay separate and the spacing becomes even.
Related tools
Privacy: this tool runs entirely in your browser. Your text is not uploaded, logged or saved, and it is never sent to analytics. Maximum input: 1 MiB.