Remove empty lines

Paste text to remove empty lines and delete blank lines in one step. Lines that contain only spaces or tabs count as empty, and you see how many were removed.

  • Free
  • No sign-up
  • Runs in your browser
Options

0 characters

Runs in your browser — your text is never sent to our servers.

How to use Remove Empty Lines

  1. Paste your text into the box.
  2. Leave the option off to remove blank lines that hold only spaces, or turn it on to keep them.
  3. Copy the cleaned text, or download it as a text file.

Features

  • Removes completely empty lines and lines with only spaces or tabs
  • Keeps every other line exactly as it was, in the same order
  • Shows how many empty lines were removed
  • Works with Windows, Mac and Linux line endings
  • Runs in your browser, so pasted text stays on your device

Supported formats and limits

  • Maximum input: 5,000,000 characters

Examples

InputResult
first second thirdfirst second third (2 empty lines removed)
a ba b (3 empty lines removed)

Limitations

  • Only whole empty lines are removed. Spaces inside a line, and blank space at the start or end of a non-empty line, are left alone; use the Remove Extra Spaces tool for that. Paragraph breaks made of blank lines are removed too, so the text becomes one continuous block of lines.

Learn more

Empty lines creep into text in many ways: copying from a web page, exporting a spreadsheet column, pasting an email thread, or saving log output. They make lists harder to read and can cause trouble when the text is fed to a script, a spreadsheet import or a form that expects one value per line.

Removing them is a mechanical step, but one detail matters: a line that looks empty may still hold a space or a tab. A strict "no characters" check would miss those, which is why this tool treats whitespace-only lines as empty by default. If you need to keep them, for instance because a file format uses indented blank lines, switch the option on and only truly empty lines are removed.

Frequently asked questions

How do I delete blank lines in a text?

Paste the text into the box. Every line with no characters, or with only spaces and tabs, is dropped and the rest is shown below, ready to copy.

Does it remove lines that contain only spaces?

Yes, by default. Turn on the option to keep whitespace-only lines if you want to remove only lines with no characters at all.

Will it change the order of my lines?

No. The remaining lines keep their original order and content.

Can I keep one blank line between paragraphs?

Not with this tool, which removes all empty lines. To join broken lines while keeping paragraphs, use the Remove Line Breaks tool.

Last reviewed: September 30, 2026