Remove empty CSV rows
Delete a row only when every cell is blank or contains nothing but whitespace. A row that still holds a value, including 0 or false, stays in the file.
CSV or Excel
Details
Instructions
- Drop a .csv file. Remove empty rows is already selected.
- Preview the rows that would be deleted. The remaining rows keep their original text.
- Apply to remove them, or reset if you want the uploaded file back.
- Download the table that remains.
Example
The middle row has no values. The last row looks sparse, but 0 and false are not blank.
name,city Ada,Tokyo , 0,false
The middle row is removed. Ada,Tokyo and 0,false remain, in that order. Neither kept row is rewritten.
When a row is empty
Every cell has to be empty. A row of commas, or a row whose cells are only spaces, is removed. A row that starts with Ada and then an empty cell stays, because Ada is still there.
The words 0 and false are values. A row that contains either one is kept, even if the rest of that row is blank.
This removes the row instead of editing it
Spaces, tabs, and other characters that trim away count as empty. The row is dropped rather than rewritten, so this page does not turn a cell of spaces into a shorter cell.
If you want the spaces removed and the row kept, trim whitespace first. If a trimmed row then becomes empty, come back here and preview the deletion.
Limitations
- One non-blank cell is enough to keep the row, even when every other cell is blank.
- This page does not remove duplicate rows and does not trim the cells that stay.
- The header is not a data row, so an empty-looking header is not deleted here.
- Other operations are available below, but only remove empty rows starts selected.
- CSV and .xlsx up to 32 MB. The download is CSV. Save .xls as .xlsx first.