CSV Cleaner

Clean CSV and Excel tables, remove empty columns and download CSV or XLSX.

On-device No sign-up Free to use

Clean the CSV controls

Drop your table file here

or choose one from your device

One UTF-8 CSV or TSV file, or one XLSX workbook, up to 20 MiB, 100,000 rows and 500 columns. A chosen file is used instead of the pasted text.

    ?

    Paste the table to clean, or leave this empty and choose a file. Your original text is never changed; the download is a new file.

    ?

    Only for a workbook. Leave empty to read the first visible worksheet, or name one, such as Sheet1, or give its 1-based number.

    ?

    Without a header row, columns are numbered column_1, column_2 and so on and header options are skipped.

    ?

    A header repeated after this step gets a numeric suffix, so two columns never share one name in the export.

    ?

    Runs before duplicate comparison, so rows that differed only by surrounding spaces count as duplicates.

    ?

    Applies to every data cell, including text that only looks like a number. Leave it off when a column carries identifiers.

    ?

    Two rows are duplicates when every cell matches after the steps above. The first copy is kept.

    ?

    A column is removed only when no row holds a value in it after the steps above. The count is reported with the other changes.

    ?

    Turns a cell such as "é" back into "é" when the text was written as UTF-8 but read as Latin-1. A cell that is already correct is left alone.

    ?

    CSV output can prefix formula-like values, including after leading whitespace. This changes stored text and is not a guarantee for every spreadsheet import. XLSX output stores cells as text without the CSV prefix.

    ?

    A workbook stores every cell as inline text, which a spreadsheet does not run, so the CSV formula guard is not applied and each source value is stored exactly as it was.

    Result

    Showing an example.

    Clean a small CSV that holds a padded cell, a duplicate row and a blank row.

    The result reports Cleaned 1 row and 2 columns, keeps one 0012 row, and downloads cleaned.csv. The duplicate row and the blank row are gone.

    Loading the tool. Your result will appear here.

    https://usefreetools.net/csv-cleaner · 20 November 2026

    Was this helpful?

    How to use CSV Cleaner

    1. Paste CSV or TSV, or choose a CSV, TSV or XLSX file. For a workbook, select the worksheet by name or 1-based number.
    2. Check the delimiter and whether the first row contains column names.
    3. Choose header names, trimming, letter case and empty-cell markers, then the blank-row, duplicate-row and empty-column rules you need.
    4. Select CSV or XLSX output. Run the cleanup, inspect the change log and preview, then download the cleaned table.

    Example: CSV Cleaner

    Clean a small CSV that holds a padded cell, a duplicate row and a blank row.

    You add
    Text: the header id,name, then the row 0012, Ana, then the same row again, then a line holding only a comma. Remove duplicate rows: on.
    You get
    The result reports Cleaned 1 row and 2 columns, keeps one 0012 row, and downloads cleaned.csv. The duplicate row and the blank row are gone.

    Options

    CSV or TSV text
    Paste the table to clean, or leave this empty and choose a file. Your original text is never changed; the download is a new file.
    Worksheet name or number
    Choose the worksheet used for cleanup. An empty choice uses the first visible sheet; otherwise enter its name or 1-based position.
    The first row holds the column names
    For cleanup, enable this when the first record names the columns. Without headings, refer to columns by their 1-based positions.
    Header names
    A header repeated after this step gets a numeric suffix, so two columns never share one name in the export.
    Trim spaces around every cell value
    Runs before duplicate comparison, so rows that differed only by surrounding spaces count as duplicates.
    Letter case for cell values
    Applies to every data cell, including text that only looks like a number. Leave it off when a column carries identifiers.
    Remove duplicate rows
    Two rows are duplicates when every cell matches after the steps above. The first copy is kept.
    Remove columns that are empty in every row
    A column is removed only when no row holds a value in it after the steps above. The count is reported with the other changes.
    Repair mis-decoded accented text
    Turns a cell such as "é" back into "é" when the text was written as UTF-8 but read as Latin-1. A cell that is already correct is left alone.
    Protect spreadsheet formulas
    The cleanup CSV export can prefix formula-like source text, including after leading whitespace. This changes stored text. An XLSX export, when offered, uses inert text cells without the CSV prefix.

    Supported inputs and limits

    File sizeCSV, TSV or XLSX up to 20 MiB
    RowsUp to 100,000 rows
    ColumnsUp to 500 columns
    • Up to 20 MiB, 100,000 rows, 500 columns and 2,000,000 cells.
    • Choose a worksheet for XLSX input; a file replaces pasted text.
    • Cleanup rules run in the stated order and keep values as strings.
    • The optional accent repair handles supported UTF-8-as-Latin-1 mistakes, without identifying arbitrary encodings.
    • A terminal newline is a record separator, not another data row.
    More details

    Preview shows 40 rows; downloads include the full result.

    CSV protection prefixes risky text.

    XLSX stores inert text without that prefix.

    Where your input is processed

    This tool does not upload your inputs. See the limits for anything saved on your device.

    The order the rules run in

    Header names, trimming, letter case and empty markers run before blank-row and duplicate removal. The optional empty-column rule follows cleanup. CSV protection runs on the export; XLSX stores inert text without adding that prefix.

    Why values stay text

    Spreadsheet importers can turn an identifier such as 0012 into a number or apply date and number formatting you did not intend. Cleanup keeps its table values as strings. A CSV is still interpreted by the application that opens it; choose text columns in that importer when exact identifiers matter. The XLSX download stores its values as text cells.

    Questions about CSV Cleaner

    Why did my formula cell gain an apostrophe?

    CSV protection is on by default and can prefix values that a spreadsheet might interpret as formulas, including text starting with =, +, - or @. The prefix changes stored text and is not a guarantee across every spreadsheet workflow. Choose Leave cells exactly as they are only when you need the original text and understand the destination's import behavior.

    Does cleaning overwrite my file?

    No. The page reads the selected input and offers a new cleaned.csv or cleaned.xlsx. It does not overwrite the file on your device.

    Why are blank rows still present after I marked empty cells?

    Marking runs before blank-row removal, so a row whose cells all became N/A is no longer empty.

    What happens to a repeated column name?

    The duplicate gets a numeric suffix, so two columns called Name become Name and Name_2.

    Does cleanup change formula-like text in Excel output?

    The cleanup XLSX download stores each value as inert text, preserving a leading equals or minus sign. CSV formula protection can instead add a prefix. Neither format recalculates saved workbook formulas.

    Page updated · Project managed by Tony Hines · Report a problem with CSV Cleaner

    Related reading

    All guides