Free Tools
Blog

Remove Empty Lines

Strip blank lines from text, or collapse extra blank lines so paragraphs are separated by just one.

Your text is processed entirely in your browser. Nothing is sent to a server.

How to use this tool

  1. 1Paste your text.
  2. 2Choose whether to also remove lines with only spaces, or keep one blank line between paragraphs.
  3. 3Copy or download the cleaned text.

Features

  • Removes every blank line, or collapses runs of them to a single blank line.
  • Optionally treats lines with only spaces or tabs as empty.
  • Optional trimming of spaces at the start and end of each line.
  • Handles Windows, Mac and Linux line endings.
  • Shows how many lines were removed.

Privacy

Your text is processed entirely in your browser. It is never sent to a server.

Frequently asked questions

How do I remove blank lines from text?

Paste it in and the blank lines disappear from the result straight away. Copy or download the cleaned text.

Can I keep the spacing between paragraphs?

Yes. Tick “Keep one blank line between paragraphs” to collapse multiple blank lines into one instead of removing them all.

What about lines that only contain spaces?

They look empty but aren’t. “Also remove lines that contain only spaces or tabs” is on by default so they’re cleaned up too.

Will it change my text in other ways?

No — apart from the options you tick, your lines are left exactly as they were.

Related tools