Remove blank rows and empty columns from a CSV

Exports pick up blank lines between sections, rows of bare commas, and columns that have a header but nothing underneath. They inflate row counts, break formulas that look for the last row and trip up imports that expect every row to hold data. Upload the file and SpreadsheetFix drops every fully empty row and column, free and without uploading anything.

Free up to
5,000 rows
Account
Not required
Upload
None
Choose a fileor drop a CSV, TSV or Excel file here, up to 50 MBProcessed in your browser. Nothing is uploaded.

No file to hand?

Before and after

Before
date,description,amount,notes,
2024-03-01,Stripe payout,1200.00,,
,,,,
2024-03-02,Office rent,-850.00,,
"   ",,,,

2024-03-04,Card refund,45.90,,
After
date,description,amount
2024-03-01,Stripe payout,1200.00
2024-03-02,Office rent,-850.00
2024-03-04,Card refund,45.90

The 3 blank lines are dropped as the file is read. The notes column and an unnamed column created by the trailing comma are removed because no row has a value in them.

How it works

  1. 1

    Upload your CSV, TSV or Excel file.

  2. 2

    SpreadsheetFix removes rows where every cell is empty or only whitespace, and columns where no row has a value, including unnamed columns left by trailing commas.

  3. 3

    Check the result in the preview, then download the compacted file.

What counts as empty

A row is removed only when every cell in it is blank or holds nothing but spaces or tabs. A row with a single value, such as a lone date or a stray “x”, is kept because it may still matter. Columns get the same test: a column is dropped only when no row has a value in it, even if it has a header.

Where blank rows and columns come from

Accounting and banking exports often insert empty lines between sections or after a totals block. Excel can save trailing commas when cells beyond your data were once edited or formatted, which creates unnamed columns, and clearing rows instead of deleting them leaves rows of empty cells behind. You don’t see any of this in a spreadsheet grid, but it shows up as phantom rows and Column1, Column2 fields in imports and Power Query.

Partly empty rows are a different problem

A row that is missing one important value, such as an invoice with no amount or a contact with no email, isn’t blank, so it stays. To catch those, use Find Missing Values, which flags rows with gaps in the columns you say are required.

Why blank rows break things

Excel treats a blank row as the edge of a table, so sorting, filters and pivot tables can silently stop at it. Import tools often reject the file or create empty records. Removing them before the file goes anywhere avoids both problems.

Questions

How do I delete blank rows in a CSV file?

Drop the file into the box above. Fully empty rows and empty columns are removed automatically, and you download the cleaned CSV. There are no formulas, filters or sorting involved.

Will it delete rows that are only partly empty?

No. A row is only removed when every cell is blank. Rows with at least one value stay exactly as they are.

Does it remove empty columns that have a header?

Yes. If a column has a header but no values in any row, it’s removed. Columns with even one value are kept.

Is this quicker than filtering for blanks in Excel?

In Excel you filter for blanks, select the visible rows and delete them, then deal with empty columns separately, and a cell holding a single space doesn’t count as blank there. Here it’s one step, and whitespace-only cells count as empty.

Is it free?

Yes. Removing blank rows and empty columns is free for files up to 5,000 rows, with no account. Pro raises the limit to 500,000 rows.