Remove empty lines — delete blank rows from text
Delete blank and whitespace-only lines from pasted text. Keep non-empty lines, duplicates and their order, then copy or download the result.

Enter text to see output.
What to know
This operation throws away every line that is empty or contains nothing but whitespace, such as spaces, tabs or an ideographic full-width space. All other lines pass through exactly as typed, so code indentation and aligned columns survive.
That is the main difference from trim whitespace, which strips each line's edges and squeezes inner spaces but leaves blank lines in place. Use this operation to close up gaps, and use trim whitespace to tidy what is on the lines themselves.
Take a block with a, an empty line, a line holding two spaces, b and a trailing newline. The result is a followed by b on consecutive lines, with no blank line at the end, because the final empty line produced by the newline is dropped too.
Output lines are always joined with a plain line feed, so a list pasted with Windows line endings comes out with Unix ones. If the next system needs paragraphs separated by one blank line, run this first and add the spacing back deliberately afterwards.
A common source of gaps is a spreadsheet column exported after filtering. Running this operation first keeps any later sorting or numbering from treating the blank entries as real items.
Worked example
This operation tests whether a line has any non-whitespace content. It removes empty rows without merging paragraphs or changing the text of the remaining lines.
Input
alpha beta alpha
Output
alpha beta alpha
Repeated non-empty lines remain. Choose Remove duplicate lines if repetition is the problem, or Join lines if you need a single-line value.
Choose a specific task 10
Related tools 4
How to use Remove empty lines — delete blank rows from text
- Paste a list with gaps, for example 40 lines of which 12 are blank, into the Text input box.
- Confirm in the Output panel that the blank lines have vanished and that indented lines kept their leading spaces.
- Paste the output into the counter to check the Lines figure, expecting 28 for this sample.
- Copy the result, or use the download icon to keep it as chatcument-text-output.txt.
Quick answers
Are lines with only spaces treated as empty?
Yes. Any line that is blank after trimming, including tabs and full-width spaces, is removed along with truly empty lines.
Does it remove indentation from other lines?
No, other lines are left exactly as they were, which is why it is safe for source code and aligned tables.
Why does the output end without an empty line?
The empty last line created by a final newline counts as blank and is removed, so the text finishes right after its last real line.
Will Windows line endings be kept?
No, the output uses plain line feeds. If a system needs CRLF, convert the endings in your editor after copying.
