Map Extract
Free tool

Remove empty lines from text

Paste text full of gaps and get it back tidy. By default every blank line goes; tick one box to keep a single empty line between paragraphs instead, so an email still reads like an email.

Runs in your browser. Nothing you enter is uploaded.

Clearing blank lines

  1. Paste the text

    From an email, a PDF, a web form or a spreadsheet column. Lines that contain only spaces or tabs count as empty, because they look empty.

  2. Pick the mode

    Leave Keep one empty line between paragraphs off to remove every blank line. Turn it on to squeeze each run of blank lines down to one.

  3. Take the result

    Copy it, or download it as a text file. The text on the non-empty lines is not changed.

Example: an email draft pasted from a notes app

A consultant drafts a follow-up in a notes app and pastes it into her email program, where it arrives with huge gaps: four blank lines under the greeting, a line of spaces near the end and two blank lines trailing after the name.

With one empty line kept between paragraphs, every gap becomes a single blank line and the paragraphs still stand apart. With the option off, the whole message closes up into consecutive lines, which suits a list better than a letter.

Input
Hi Jo,



Thanks for your time today.

I have attached the quote.
   

Best wishes,
Amir

Result
Hi Jo,

Thanks for your time today.

I have attached the quote.

Best wishes,
Amir

Which setting for which job

You haveSettingYou get
A column of emails or domains with gapsOption offOne item per line, nothing in between
An address block copied from a websiteOption offName, street, town and postcode on consecutive lines
A letter or email with uneven gapsKeep one empty lineParagraphs separated by exactly one blank line
Text copied from a PDF with a blank line after every lineOption off, then join linesUse remove line breaks next to rebuild the sentences

Questions people ask

How do I delete blank lines from a list?

Paste the list here with the option left off. Every empty line, and every line that holds only spaces or tabs, is removed, and the remaining lines close up in their original order. In Excel, the equivalent is filtering a column for blanks and deleting those rows.

Why are some lines that look empty not removed in other tools?

They usually contain invisible spaces or tab characters. Many editors only remove lines that are truly empty, so a line holding a single space survives. This tool treats any line made only of whitespace as blank, which matches what you see on screen.

Does it remove duplicates or extra spaces too?

No, it only deals with blank lines, so the words on each line are untouched. For repeated lines use remove duplicate lines, and for doubled spaces, tabs or spaces at line ends use remove extra spaces. Running them one after another gives a fully cleaned list.

Where your data goes

Blank lines are stripped by code in your open tab. Your text stays on your device and disappears when you close the page.

Checked against the tool on

Top