Skip to content

Remove Empty Lines

Delete blank lines or collapse them into one without touching the rest of your text.

Mode
Options
Runs in your browser — your data is not uploaded.

How to use

  1. Paste your text into Your text, or click Upload to load a text file.
  2. Under Mode, select Remove all, Collapse to one, or Only at start and end.
  3. Click Copy to copy Result, or Download to save it as a text file.

Examples

Clean a contact list with spaces-only and tab-only lines

Input
alex@example.com
   
jordan@example.com
	

sam@example.com
Output
alex@example.com
jordan@example.com
sam@example.com

Keep one blank line between meeting notes

Input

Project update: The draft is ready.



Next steps: Send feedback by Friday.

Output
Project update: The draft is ready.

Next steps: Send feedback by Friday.

Trim the edges of an email draft

Input

Hi Morgan,


The updated schedule is attached.

Thanks,
Alex

Output
Hi Morgan,


The updated schedule is attached.

Thanks,
Alex

FAQ

Does it remove lines that contain only spaces or tabs?

By default, spaces-only and tab-only lines count as empty, including lines containing non-breaking spaces or zero-width characters. Turn off Treat whitespace-only lines as empty to keep them.

Will removing blank lines from code change the remaining lines?

Lines with content stay in their original order and are never merged. Their text and indentation stay unchanged unless you enable Remove trailing spaces, which strips spaces and tabs from the ends of remaining lines.

Does it preserve Windows line endings?

The output uses LF by default, regardless of the input's line endings. Enable Keep Windows line endings (CRLF) to use CRLF throughout the result.

How large a text file can I upload?

Files larger than 50 MB are rejected. Files are read as UTF-8 text.

Is my text uploaded or saved?

Your text is processed in your browser, with no network requests containing it. The text is not saved; only your option settings are stored locally.