About the Remove Empty Lines
Blank lines are useful for separating paragraphs, but they get in the way in lists, CSV files and code. Text exported from other programs often has an empty line between every row. This tool removes every line that is empty or contains only whitespace, and keeps every other line exactly as it is.
Because lines containing only spaces are also removed, the result is reliably compact, which is useful before you count, sort or import a list.
How to use it
- Paste your text.
- Click Remove Empty Lines.
- Copy or download the compact result.
Example
First item Second item Third item
First item Second item Third item
When to use it
- Compacting lists copied from web pages or documents.
- Preparing lines for import into a spreadsheet.
- Cleaning log files and exported data.
- Removing gaps before numbering lines with Add Line Numbers.
Frequently asked questions
Will it change the lines that contain text?
No. Lines with content are left exactly as they are, including their leading spaces.
Can I keep a single blank line between paragraphs?
This tool removes all blank lines. To join wrapped lines while keeping paragraphs, use Remove Line Breaks.
Does it work with Windows line endings?
Yes. Both CRLF and LF line endings are handled.
Is the text I enter kept private?
Yes. The Remove Empty Lines runs entirely in your web browser, so your text is never uploaded to or stored on our servers. Like most free websites, TextForge shows ads from Google, which may use cookies. See our Privacy Policy for details.