Remove Empty Lines deletes the empty lines and the lines that only contain spaces from your text. Paste your text, click the button and copy the result. It is free and runs in your browser.
Random words in front of other random words create a random sentence. Random words in front of other random words create a random sentence.
Random words in front of other random words create a random sentence. Random words in front of other random words create a random sentence.
Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.
This tool removes the empty lines from your text. A line that only contains spaces or tabs counts as empty, so it is removed too. The lines with text stay in their original order.
Lines with text are not changed. Their spaces are kept, and nothing is joined together. If you want paragraphs to stay separated, tick Keep one empty line between paragraphs and several empty lines in a row become one.
Use it to clean up text copied from websites, PDFs or emails, to tidy lists, or to remove the gaps in code and log files.
Each example shows the text before and after. The option is off unless the example says otherwise.
| Case | Before | After |
|---|---|---|
| Example | Random words in front of other random words create a random sentence. Random words in front of other random words create a random sentence. | Random words in front of other random words create a random sentence. Random words in front of other random words create a random sentence. |
| Lines with only spaces or tabs | a b c | a b c |
| Empty lines at the start and end | a b | a b |
| Spaces on text lines are kept | a b | a b |
| Keep one empty line (option on) | a b c | a b c |
| Keep one empty line, with edges and space-only lines (option on) | a b | a b |
| No empty lines | one two | one two |
Cleaning text copied from websites, PDFs and emails, tidying lists, and removing the gaps in code and log files.
Lines with only spaces or tabs count as empty. Lines with text are not changed. Tick the option if paragraphs should stay separated. The result replaces your text, so use Undo if you need the original.
To join all lines into one try Remove Line Breaks. To remove repeated lines try Remove Duplicate Lines. To remove spaces at the start and end of lines try Removing Leading And Trailing Spaces.
It removes every empty line from your text, including lines that only contain spaces or tabs. The lines with text stay in their original order.
Paste your text into the box and click Remove Empty Lines. The empty lines are removed. Click Copy to use the result, or Undo to go back.
Yes. A line with only spaces or tabs counts as empty and is removed.
No. Lines with text are left exactly as they are, including spaces at their start or end. To remove those use Removing Leading And Trailing Spaces.
Yes. Empty lines at the start, in the middle and at the end are all removed.
Yes. Tick Keep one empty line between paragraphs. Several empty lines in a row become one, and the empty lines at the start and end are still removed.
An empty line is a line with no text. This tool removes the empty lines only. To join all your lines into one use Remove Line Breaks.
Your text is left as it is and you see the message No empty lines found.
Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.
Last updated: 11 November 2026