Skip to content

Remove Empty Lines

Deletes blank lines from text, including lines that contain only spaces.

Your text stays on this device

This tool runs entirely inside your web browser. Your text is processed on your own device and is never sent to our servers. How this works

Without empty lines

Remove Empty Lines is a free tool that deletes blank lines from text, including lines that only contain spaces or tabs. It tells you how many were removed. The text is processed in your browser and never uploaded.

How to remove blank lines

  1. Paste your text into the left box, or open a text file.
  2. The text without empty lines appears on the right.
  3. Copy or download the result.

When this helps

Lines that look empty but aren’t

Text copied from websites, Word documents and chat apps often contains “blank” lines that hold invisible characters: spaces, tabs, non-breaking spaces or zero-width spaces. Simple find-and-replace can’t see them, so the gaps stay. With Treat lines with only spaces as empty turned on (the default), all of these lines are removed. Turn it off to delete only lines that are completely empty, for example when indentation-only lines matter in code.

Keeping paragraphs

Removing every blank line also joins paragraphs together. If you just want to reduce big gaps to a single blank line, use Remove Extra Spaces instead.

Frequently asked questions

Does it remove lines with only spaces?

Yes, by default. Untick the option to remove only lines that are completely empty.

I only want single blank lines between paragraphs, not none.

Use Remove Extra Spaces with “Collapse repeated blank lines”, which keeps one empty line between paragraphs.

Why are some blank lines not removed by other tools?

They aren’t truly empty: they contain invisible characters such as non-breaking spaces, tabs or zero-width spaces, often left behind by web pages and Word documents. This tool treats those lines as empty as well.

Last updated

Missing a feature, or need a tool we don’t have? Suggest it.