Skip to content

CSV cleaner

Paste your CSV or open the file: the delimiter is found automatically, line endings and quotes are normalised, whitespace, empty and duplicate rows are cleaned, rows with an inconsistent column count and encoding damage are reported. The file is read in your browser; nothing is sent anywhere.

Free tool · Integration

Paste text or open a file (up to 10 million characters). Delimiter: comma, semicolon, tab or pipe.

Cleaning runs in your browser; the text you paste and the file you open are not sent anywhere or stored.

Cleaned output

The cleaned CSV appears here.

Cleaning options

Line ending

Good to know

  • The expected column count is the most common width (the header row's width on a tie). Rows with extra columns are not cut, so no data is lost; they are only reported.
  • A duplicate row is one whose cells are all equal; the first stays. A row identical to the header (a repeated header in concatenated files) also counts as a duplicate.
  • Formula escaping puts a single quote in front of the cell, and spreadsheet programs keep showing it; the aim is to stop the cell from running as a formula. If the file will only be read by machines you can switch the option off.
  • Damaged characters (such as ü) are not repaired, only warned about. The most reliable fix is to export the file again from its source with the right encoding.

This tool fixes common CSV problems and reports what changed; it does not check the correctness, semantic consistency or confidentiality of the data. Compare sample rows with the source before using the cleaned file. When sharing files with personal data, keep your GDPR obligations in mind.

Do CSV transfers between your systems keep breaking? We can design the transfer format, validation and error handling together.

Request a call

01

How to use it

  1. A

    Paste the CSV text or open the file; the delimiter is found automatically, or choose it manually.

  2. B

    Set the cleaning options; read in the report what was changed how many times and which warnings appeared.

  3. C

    Copy or download the clean CSV; choose the output delimiter and line ending to suit the target system.

02

What is cleaned?

The tool reads the CSV by RFC 4180 rules (quotes, "" escapes, line breaks inside quotes) and then, in order: drops a leading BOM, finds the delimiter, trims whitespace at cell edges, removes completely empty rows, empty columns and duplicate rows, applies formula-injection escaping and writes the output with the delimiter and line ending you chose.

The effect of each step is counted and shown in the report. Steps that do not change the data semantically (trimming, line endings) and steps that delete data (empty and duplicate rows) are separate options; you can switch the latter off.

03

What is formula injection (CSV injection)?

Excel and similar programs treat a cell that starts with =, +, - or @ as a formula. If data from outside (e.g. a form field) contains a value such as =HYPERLINK(...), a link may open or data may leak on the computer of whoever opens the CSV. The countermeasure is to put ' in front of cells that start with these characters.

Plain numbers (-45.20 or +905551234567) are not formulas; by default they are left alone because they must stay numbers. If you switch that option off, negative numbers are escaped too.

04

What causes encoding damage?

When a file written as UTF-8 is opened with an old encoding such as Windows-1252, ü becomes ü, ı becomes ı and ş becomes ÅŸ. In the opposite direction, if an old-encoding file is taken for UTF-8, the � mark appears. This tool finds both traces and warns; in the first the information is still there and is fixed by opening with the right encoding, in the second the characters are lost.

When opening a file the tool tries UTF-8 first; if that fails it reads it as Windows-1254 in the Turkish interface and Windows-1252 otherwise, and tells you so. Adding a BOM to the downloaded file helps Excel recognise UTF-8.

FAQ

Is my CSV or file sent anywhere?
No. The file is read with your browser's FileReader and cleaned on your device; the content is neither sent over the network nor stored. Even so, we recommend anonymising files with personal data before you share them.
Accented characters look broken in Excel, what should I do?
Excel often does not take a CSV without a BOM for UTF-8. Set the output delimiter and line ending, switch on "Add a UTF-8 BOM", download the file and open it in Excel that way. Alternatively choose UTF-8 as the encoding in Excel's "Data > From Text/CSV" import.
Why is the delimiter detected wrongly?
The delimiter is the candidate with the most consistent column count over the first 30 records. For single-column files, or when each row has a different number of delimiters, the guess can be wrong. Choose the input delimiter manually; in files that use a decimal comma the delimiter is usually a semicolon.
What does an unterminated quote mean?
If a field starts with a quote and is never closed, by the CSV rules the rest of the file is inside that field. The tool treats it as one cell and reports the line where it began; it usually means a quote is missing or extra in the source.
What happens with rows that have an inconsistent column count?
They are reported first: the expected width, how many rows differ and the first example line. If you like, short rows are padded with empty cells. Rows with extra columns are not cut because data would be lost; you have to fix them at the source (often a cell contains an unescaped delimiter).
How are duplicate rows found?
Rows whose cells are all exactly equal are duplicates; because trimming and empty-column removal are applied first, rows that differ only in whitespace or in an empty column also count as equal. The first one stays. De-duplicating by a single key column is not available in this tool.

Let's make your data transfers robust

We design format, validation and error handling for file and API transfers between CRM, ERP and third-party systems. Let's talk through your current flow in a free discovery call.