My Tool Studio
Text

Remove Empty Lines

Copying a column out of Excel or Google Sheets drags every empty cell along as a gap, and a thirty item list suddenly spans sixty lines. Paste it here to remove empty lines instantly: the tool drops every blank line, including ones that only contain spaces or tabs, and keeps everything else in its original order. There's no upload step and no settings screen, you remove blank lines online right in the tab, live as you type. Writers use it to tighten pasted transcripts, and developers use it to strip blank lines out of config dumps, SQL results, and log files.

Always freeNo sign upRuns in your browser

How to use

01

Paste the gappy text

Drop your text into the input pane, or click Try sample to load a short example that mixes real lines with blank ones and a whitespace only line.

02

Let the filter run

Removal is instant and automatic. Every line that's empty or holds nothing but spaces and tabs disappears from the output pane while the remaining lines keep their order.

03

Take the compact result

Click the Copy button above the output to carry the tightened text into your spreadsheet, script, or document. The Clear button resets the input for another batch.

Why Remove Empty Lines

Common questions

Does removing empty lines also catch lines that only contain spaces?
Yes. Any line whose content trims down to nothing is removed, so lines holding only spaces or tabs go out with the truly empty ones. Those invisible lines are usually what makes gaps seem impossible to delete by hand.
Will removing blank lines reorder or edit my remaining text?
No. Surviving lines keep their exact content and their original sequence. The tool only decides which lines stay, it never rewrites what's inside them.
Can I delete empty rows from text copied out of a spreadsheet?
That's the main use case. Empty cells copy over as blank lines, so pasting a column here and copying the output back gives you the values with the gaps closed up.
Can I keep one blank line between paragraphs while removing the extras?
Not with this tool, it removes every blank line without exceptions. To collapse runs of blank lines down to a single one, use the Find and Replace tool with a regex that matches consecutive newlines instead.
Why do empty lines appear when I paste from Excel in the first place?
Spreadsheets copy the whole selected rectangle, so every empty cell in your selection becomes a blank line in the clipboard. Filtered and merged cells make it worse, since a cell merged across three rows copies as one value plus two empties.
Are blank lines ever worth keeping?
Sometimes. Markdown uses them to separate paragraphs, Python style guides use them between functions, and email formats rely on one to split headers from the body. Strip them from lists and data freely, but think twice with source files and prose.
How much text can the remove empty lines tool handle?
Plenty. It runs locally in your browser with a simple per line filter, so multi megabyte log files clean up without any noticeable delay and without touching a server.

More Text tools

View all