HomeGuidesCSV Cleaner

How to Remove Blank Rows from a CSV File

A practical guide — Excel, Google Sheets, and the automatic way.

Blank rows are the #1 reason CSV imports fail silently. A client sends you a spreadsheet export, you upload it to your invoicing tool or CRM, and rows shift, totals break, or the import just errors out — all because of invisible empty lines scattered through the file.

Here's how to get rid of them, whichever tool you have handy.

Method 1: Excel

  1. Open the CSV in Excel.
  2. Select the entire sheet (Ctrl+A).
  3. Go to Home → Find & Select → Go To Special.
  4. Choose Blanks and click OK — every blank cell is now selected.
  5. Right-click any selected cell → Delete → Entire row.
  6. Save the file.

This works well, but watch out: it deletes any row containing a blank cell in the selection, so use it on a copy if some blanks are legitimate.

Method 2: Google Sheets

  1. Import the CSV into Google Sheets (File → Import).
  2. Select all (Ctrl+A), then Data → Create a filter.
  3. Click the filter icon on any column, uncheck (Blanks), and delete the visible blank rows.
  4. Or simpler: sort any column A→Z — blank rows sink to the bottom where you can delete them in one block.

Method 3: Python (for the technical)

import csv

with open('messy.csv', newline='', encoding='utf-8') as f:
    rows = [r for r in csv.reader(f) if any(c.strip() for c in r)]

with open('clean.csv', 'w', newline='', encoding='utf-8') as f:
    csv.writer(f).writerows(rows)

This keeps only rows that have at least one non-empty cell.

The one-click way

Don't want to do this by hand every time? CSV Cleaner removes blank rows automatically — along with messy headers and encoding problems — in one click. $9 once, yours forever.

See CSV Cleaner

More CSV fixes: fix headers with spaces · convert to UTF-8 · CSV won't import?