How to remove empty lines in Excel
Updated November 26, 2026
In Excel, select a column that is always filled, go to Home > Find & Select > Go To Special, choose Blanks, click OK, then Home > Delete > Delete Sheet Rows: every empty row goes at once. If some rows are only partly empty, use a filter instead. In Word, replace ^p^p with ^p in Find and Replace until nothing is found.
How to remove empty lines in Excel with Go To Special
This is the fastest way to delete many empty rows at once. Work on a copy if the table matters: Ctrl+Z only undoes the deletion right after.
- Select, from the first to the last row of data, a column that is always filled in real rows, such as a name or ID column.
- Go to Home > Find & Select > Go To Special. The shortcut is Ctrl+G, then the Special button.
- Choose Blanks and click OK: Excel selects every empty cell of the selection.
- Go to Home > Delete > Delete Sheet Rows. All these rows are deleted together and the rows below move up.
Good to know : If you select the whole table instead of one column, a single blank cell is enough to delete its row, along with the data in the other columns. Cells that contain a space, or a formula returning "", are not blanks for Excel and are not selected.
Delete blank rows with a filter or a sort
A filter shows the empty rows before you delete them, which is safer on a table typed by hand.
- Click inside the table and go to Data > Filter.
- Open the arrow of a column that is always filled, clear (Select All), scroll down, tick (Blanks) and click OK. To target rows that are empty everywhere, do the same on the other columns: the filters add up.
- Select the numbers of the visible rows, then use Home > Delete > Delete Sheet Rows. Only the visible rows are deleted.
- Click Data > Filter again to remove the filter.
Good to know : Sorting also works: Microsoft states that blank cells are always placed last, in ascending and descending sorts, so the empty rows end up at the bottom. The order of the rows changes: first add a column numbered 1, 2, 3… if you need to restore it.
Rows that look empty but are not: spaces and formulas
A cell holding a space, a non-breaking space pasted from the web, or a formula returning "" looks empty. Go To Special skips it, and Microsoft notes that a blank cell is different from a cell containing spaces. To catch these rows, add a helper column that tests what each row really shows:
- Type it in E2, adjust A2:D2 to your columns and fill it down: TRUE means the row looks empty.
- Filter column E on TRUE, delete the visible rows as above, then remove the filter and the helper column.
- =COUNTA(A2:D2)=0 is stricter: it returns TRUE only for truly empty rows, since a space or a formula returning "" counts as content.
- TRIM leaves non-breaking spaces: if rows resist, replace TRIM(A2:D2) with TRIM(SUBSTITUTE(A2:D2,CHAR(160),"")).
=SUMPRODUCT(LEN(TRIM(A2:D2)))=0
Remove empty rows with a formula: FILTER
In Excel 2021, Excel 2024 and Microsoft 365, FILTER returns the table without its empty rows in another place and updates itself when the source changes. The + sign means OR: a row is kept as soon as one of its columns is filled.
- If one column is always filled in real rows, =FILTER(A2:C500,A2:A500<>"") is enough.
- Empty cells inside the kept rows show 0. Writing A2:C500&"" as the first argument keeps them empty, but turns numbers into text.
- To keep fixed values, copy the result and use Home > Paste > Paste Values. Excel 2019 and older answer #NAME?.
=FILTER(A2:C500,(A2:A500<>"")+(B2:B500<>"")+(C2:C500<>""))
Empty rows at the end of the sheet that bloat the file
Press Ctrl+End: Excel jumps to the last cell it considers used. If it lands far below your data, empty rows that still carry formatting are saved with the workbook, which, as Microsoft explains, makes the file larger than necessary and can add printed pages.
- Click the number of the first empty row under your data and press Ctrl+Shift+End.
- Go to Home > Clear > Clear All, or delete these rows with Home > Delete > Delete Sheet Rows.
- Do the same with the empty columns on the right if Ctrl+End also goes too far right.
- Save, close and reopen the workbook: Ctrl+End now stops at your last row of data.
Good to know : In Excel for Microsoft 365, Review > Check Performance finds these useless formatted cells in the whole workbook and cleans them with Optimize all. Microsoft warns that sheets drawn with colored cells (pixel art) would be erased.
How to remove empty lines in Google Sheets and LibreOffice Calc
Google Sheets has no command dedicated to empty rows. The cleanest way is to rebuild the table without them with FILTER, then keep only the values.
- Add a new sheet. If your data is on a sheet named List, type =FILTER(List!A2:C,List!A2:A<>"") in A2, column A being always filled.
- Select the result, copy it and paste it over itself with Ctrl+Shift+V, which pastes values only.
- Delete the original sheet, or keep it as a backup.
- For a handful of empty rows, Ctrl+click their numbers on the left, right-click and delete the selected rows.
- In LibreOffice Calc, choose Data > AutoFilter, then Filter by Condition > Empty on a column, select the rows shown and delete them: LibreOffice only deletes the visible rows of a filtered range.
How to remove empty lines in Word
In Word, an empty line is an empty paragraph: two paragraph marks in a row. Click ¶ on the Home tab to show them.
- Press Ctrl+H to open Find and Replace.
- Type ^p^p in Find what and ^p in Replace with.
- Click Replace All, and again until Word makes 0 replacements: several empty lines in a row need several passes.
- If empty lines remain, they hold spaces or tabs: replace ^w^p with ^p first (^w means white space), then run ^p^p again.
- For manual line breaks (Shift+Enter), use ^l^l and ^l instead.
- If ¶ shows no empty paragraph, the gap is paragraph spacing: set the spacing before and after to 0 in the Paragraph settings.
- In LibreOffice Writer, open Edit > Find & Replace, tick Regular expressions, search for ^$ and replace with nothing.
Remove empty lines online with Utiloz
Paste a column copied from Excel or Google Sheets, a list or a text from Word into Remove empty lines on Utiloz: blank lines disappear at once and a counter shows how many went. Lines with only spaces or tabs count as empty by default, which catches the false empty rows too. A fully empty row copied from a spreadsheet arrives as a line of tabs, so it goes, while a partly filled row stays; paste the result back into the sheet.
Options keep one blank line between paragraphs, handy for Word text, and trim the spaces at line ends. Everything runs in your browser: nothing is uploaded. The tool handles text, so formulas and formatting do not come back. To join lines instead, use Remove line breaks.
Frequently asked questions
How do I delete all empty rows in Excel at once?
Select a column that is always filled, use Home > Find & Select > Go To Special > Blanks, then Home > Delete > Delete Sheet Rows. Ctrl+Z undoes it right after.
How do I remove empty rows at the end of an Excel sheet?
Click the first empty row number under your data, press Ctrl+Shift+End, use Home > Clear > Clear All or delete the rows, then save, close and reopen the file.
Why does Excel not delete rows that look empty?
Their cells hold a space or a formula returning "", so they are not blank for Excel. A helper column with =SUMPRODUCT(LEN(TRIM(A2:D2)))=0 flags them; filter it on TRUE and delete those rows.
How do I remove empty lines in Word?
Press Ctrl+H, type ^p^p in Find what and ^p in Replace with, then click Replace All until Word makes no more replacements.
How do I remove empty lines in Google Sheets?
In a new sheet, use =FILTER(List!A2:C,List!A2:A<>"") on a column that is always filled, then paste the result over itself with Ctrl+Shift+V to keep only the values.