Boneyard Tools

Remove Empty Lines From Text

Paste text to delete blank and whitespace-only lines while keeping your content in order. You can also trim each line or collapse gaps to a single blank line.

How to remove empty lines

  1. Paste your text into the box.
  2. Choose whether to trim lines or collapse gaps to a single blank line.
  3. Copy the cleaned text with the blank lines removed.

Examples

Strip all blank lines

Apple


Banana
   
Cherry
Apple
Banana
Cherry

Collapse to single blanks

Block one



Block two
Block one

Block two

Frequently asked questions

Does it remove whitespace-only lines too?

Yes. Lines that contain only spaces or tabs count as empty and are removed, the same as fully blank lines.

What does collapse to a single blank line do?

Instead of removing every blank line, it keeps one blank line between blocks of text, so paragraph breaks are preserved while extra gaps are squashed.

Will the order of my lines change?

No. The remaining content lines stay in their original order. Only the blank lines are removed.

Does it handle Windows and Mac line endings?

Yes. CRLF, CR and LF line endings are all recognized, and the output uses standard newline characters.

Is my text private?

Yes. Everything runs in your browser and nothing is uploaded to a server.

Related tools