Remove empty lines from text

Delete all blank lines from your text, so that only lines with content remain. The note tells you how many were removed.

How it works

  1. Paste your text

    Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.

  2. Instant result

    The result appears as you type. Change the options and see straight away what changes.

  3. Copy or download

    Copy the result with one click, save it as a file or use it as input for a next step.

Options

  • Treat lines with only spaces as empty (on by default). Untick it to remove only lines that are completely empty.
  • Keep one blank line between paragraphs: instead of deleting all gaps, runs of blank lines are reduced to a single one.

Blank lines at the start and end of the text are always removed.

Related

To clean up spaces as well, use normalize whitespace. To remove repeated lines, use remove duplicate lines. To put everything on a single line, use join lines.

Frequently asked questions

Is the remove empty lines free?

Yes. The remove empty lines is completely free, with no account, sign-up or usage limit.

Is my text stored?

No. Your text is processed in your browser and is not sent to a server or stored.

Is there a maximum length?

No, there is no fixed limit. Very long texts can just be a little slower.