Skip to content
M2TOOLKIT

Text · free tool

Remove Empty Lines

Delete blank lines from text, or squeeze several blank lines down to one.

Use it as often as you like — it's free, with no sign-up and no limits.

  • Text
  • Free
  • No sign-up
  • Runs in your browser
  • Updated
Mode
0 characters

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the Remove Empty Lines

  1. Type or paste your text into the box.
  2. Choose to remove all empty lines or keep one between paragraphs.
  3. Copy the result or download it as a text file.

What does this tool do?

Lines that contain only spaces or tabs are treated as empty too, because they look empty and usually cause the same problems.

Blank lines sneak in when copying from emails, PDFs and spreadsheets, or when exporting lists from other apps. Removing them makes lists easier to sort, count and paste into forms or code.

Why use it?

  • Tidy code, logs and lists.
  • Fix double-spaced text pasted from emails.
  • Keep paragraphs readable with the collapse option.

Example

Three paragraphs separated by four blank lines each become three paragraphs separated by one blank line in “collapse” mode.

Privacy

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.

Frequently asked questions

Do lines with only spaces count as empty?

Yes. Lines that contain only spaces or tabs look empty and usually cause the same problems, so they're removed too.

Can I keep some spacing between paragraphs?

Yes. Instead of removing every blank line, you can squeeze runs of blank lines down to a single one, which keeps paragraphs apart but removes the large gaps.

Last reviewed by the M2Toolkit team.

Other tools people use alongside the remove empty lines.