CSV looks like the simplest data format there is — values separated by commas — yet almost every CSV from a real system arrives with problems. Here are the ten that cause most trouble, how to recognise each one, and how to fix it, from quick spreadsheet fixes to a one-line SQL statement.
1. The wrong character encoding
Symptom: names such as “São Paulo” or “₹500” instead of “São Paulo” and “₹500”. The file was saved in one encoding (often UTF-8) and opened in another (often Windows-1252).
Fix: open the file explicitly as UTF-8. In Excel use Data → From Text/CSV and choose “65001: Unicode (UTF-8)”. When producing CSVs for Excel, save as “CSV UTF-8”, which adds a byte-order mark Excel recognises. Browser tools such as SnipFerry read UTF-8 by default.
2. Semicolons, tabs or pipes instead of commas
Symptom: everything lands in one column. Many European systems use semicolons because the comma is their decimal separator; databases often export tab-separated or pipe-separated files.
Fix: tell the importer the delimiter, or use a tool that detects it. SnipFerry’s data tools check commas, semicolons, tabs and pipes and pick the one that splits rows consistently.
3. Commas and line breaks inside values
Symptom: rows with too many columns, or a single record broken across several lines — typically addresses (“12, MG Road”) or comments with new lines.
Fix: properly formed CSV wraps such values in double quotes and doubles any quote inside ("He said ""hi"""). If the producing system did not quote them, the file is genuinely ambiguous; re-export with quoting, or ask for tab-separated output.
4. Extra rows above or below the table
Symptom: the first “column names” are a report title, or the last row says “Total” or “Exported by…”.
Fix: delete the extra rows so the file starts with exactly one header row. Totals in particular must go; any tool you load the data into will calculate them again and double-count.
5. Duplicate or blank column names
Symptom: two columns called “Date”, or a header cell left empty. Databases and SQL tools reject these or rename them unpredictably.
Fix: give every column a short, unique, descriptive name. Lower-case names with underscores (order_date, unit_price) work everywhere and need no quoting in SQL.
6. Leading and trailing spaces, inconsistent capitalisation
Symptom: group totals show “Delhi” and “Delhi ” as separate rows, or “north”, “North” and “NORTH” as three regions.
Fix: trim every text cell and standardise case. The CSV Analyzer flags both problems and its cleaned download trims spaces. In SQL: SELECT UPPER(TRIM(region)) AS region, … FROM data.
7. Numbers stored as text
Symptom: a numeric column will not sum, sorts as 1, 10, 2, or is detected as text. Causes include thousands separators in an unexpected style, currency symbols, units (“5 kg”), spaces, “approx.”, or a stray non-breaking space.
Fix: keep units in the column name and only the number in the cell. SnipFerry reads common forms such as 1,234.50, ₹1,00,000, $99 and (300) as numbers, and the analyzer lists the cells it could not read so you can correct them.
8. Dates in several formats
Symptom: 03/04/2026 (is that March or April?), 2026-04-03 and “3 Apr 2026” in the same column; or dates that sort alphabetically.
Fix: convert to ISO 8601 — YYYY-MM-DD — which is unambiguous, sorts correctly as text and is understood by every tool. When a column mixes day-first and month-first values, look for a value with a day above 12 to tell which convention the source uses, and check with whoever produced the file. In SQL you can normalise with date(order_date) once the format is consistent.
9. Missing values in disguise
Symptom: blanks written as “N/A”, “NA”, “null”, “-”, “0” or “9999”. Zeros and sentinel numbers are the dangerous ones because they are included in averages.
Fix: replace placeholders with truly empty cells. SnipFerry already treats N/A, null, none, “-” and similar as blank; zeros and 9999 need a decision from you, for example NULLIF(score, 9999) in SQL.
10. Duplicate rows
Symptom: counts and totals are higher than expected; the same order appears twice.
Fix: remove exact duplicates (the analyzer’s cleaned file does this), and check whether an ID that should be unique repeats: SELECT order_id, COUNT(*) FROM orders GROUP BY order_id HAVING COUNT(*) > 1.
A cleaning workflow that scales
- Keep the original file untouched and work on a copy.
- Profile it first so you know what is wrong before changing anything.
- Fix structure (encoding, delimiter, header, extra rows) before content.
- Fix content column by column: types, spaces, case, dates, placeholders.
- Remove duplicates last, after values are standardised — two rows that differ only by a trailing space are duplicates too.
- Write down every change, so the cleaning can be repeated on next month’s export.
If the same cleaning recurs every month, express it as one SQL query in SQL Query on CSV (see How to Query CSV Files with SQL) and save the query text: paste the new file, run the query, download the clean result. For garbled characters like é, read Character Encoding Explained.