How to Clean a CSV File Online, Step by Step
To clean a CSV file online, check its encoding, delimiter and header row first, then profile every column, trim whitespace, convert formatted numbers to real numbers, handle missing values and drop duplicate rows. TensorTurn does the profiling in your browser the moment you upload, and its AI data editor turns plain-English instructions into reviewable cleaning steps, with one-click auto-fix for values like "$1,234.56" and "50%".
Why CSV files get messy
CSV looks simple: rows of values separated by commas. In practice every system writes it slightly differently. A CRM export might use semicolons because the locale uses commas as decimal separators, a spreadsheet might save in a legacy encoding, and a reporting tool might add a title line above the real headers. On top of the format issues come content issues: people type extra spaces, numbers are exported with currency symbols, and the same record appears twice because two exports were concatenated. None of this is visible until a sum fails or a chart shows two bars for the same city.
The most common CSV problems and fixes
| Problem | Symptom | Fix |
|---|---|---|
| Wrong encoding | Characters like "é" instead of "é", or replacement symbols | Re-save or re-export the file as UTF-8 before uploading |
| Wrong delimiter | Everything lands in one column, or columns split mid-value | Re-export with commas or tabs; save tab-separated data as TSV |
| Extra lines above the header | Column names like "Report generated 2026-01-01" | Remove title lines so the first row is the header, or rename columns after import |
| Duplicate or blank header names | Columns called "Unnamed" or two columns with the same name | Rename columns to unique, descriptive names |
| Leading or trailing spaces | Two categories that look identical | Trim whitespace |
| Formatted numbers | "$1,234.56", "1,234,567", "50%", "(1234)" read as text | Strip formatting and cast to number |
| Placeholder values | "N/A", "-", "null", "?" inside numeric columns | Find and replace placeholders, then cast to number |
| Duplicate rows | Row count higher than expected, duplicate alert | Drop exact duplicates after normalising text |
Check encoding, delimiter and header before you upload
Three structural problems are best fixed at the source, because no cleaning step can reliably guess what was intended. First, encoding: if accented letters or currency symbols look garbled when you open the file, export it again as UTF-8, which is what modern tools expect. Second, delimiter: if your values contain commas (addresses, descriptions) they must be quoted, otherwise columns shift. If the export uses tabs, save it as .tsv, which TensorTurn accepts directly. Third, the header: the first line should contain the column names and nothing else. If the export adds a report title, a filter summary or a blank line on top, delete those lines in a text editor first.
A quick sanity check after uploading catches most structural errors. If a column is profiled as a mixed type, or a numeric column suddenly has a few text values, a delimiter or quoting problem has probably shifted part of a row. TensorTurn's mixed-type column detection and the column profile make this visible in seconds.
Step by step: clean a CSV on TensorTurn
- Upload the CSV (or TSV) file, or import it by URL. Profiling starts immediately and runs in your browser.
- Read the data quality score and alerts. Note columns with high missing %, mixed types, duplicate rows and outliers.
- Open the AI data editor and fix names first, for example "rename cust_nm to customer_name and delete the column called notes".
- Standardise text: "trim whitespace in all text columns and make the city column title case".
- Run one-click auto-fix to parse formatted numbers like "$1,234.56", "1,234,567", "50%" and "(1234)" into numeric values.
- Replace placeholders: "replace N/A and - with empty in the revenue column, then cast it to number".
- Handle missing values per column: drop rows, or fill with mean, median, mode or a constant.
- Drop duplicate rows, then sort if you want a predictable order.
- Review every planned step before approving, then re-check the profile to confirm the result.
- Download the cleaned CSV with one click, or train a model on it directly.
Formatted numbers: the silent CSV killer
A column that looks numeric to a human is often text to software. "$1,234.56" has a currency symbol and a thousands separator, "50%" needs dividing by 100 if you want a proportion, and "(1234)" is accounting notation for minus 1234. If you leave these as text, averages, correlations and models simply skip the column or treat each value as a category. TensorTurn's auto-fix handles these patterns in one click, and the column profile updates to a numeric type with real min, max, skewness and a histogram, which is the easiest way to confirm the conversion worked.
Whitespace, case and duplicates: order matters
Duplicate detection compares values exactly, so "Acme Ltd" and "acme ltd " are different strings. If you drop duplicates first, those near-identical rows survive. Always trim whitespace and normalise case on the identifying columns before you drop duplicates. If spelling variants exist, map them to one canonical value with a map values step first. Then a single drop duplicates step removes far more of the real duplication.
Common mistakes when cleaning CSV files
- Opening and re-saving the CSV in a spreadsheet app, which can silently reformat dates, strip leading zeros from IDs and change the encoding.
- Converting ID or postcode columns to numbers, which removes leading zeros. Keep identifiers as text.
- Treating "0" and empty as the same thing. A missing value and a real zero mean different things.
- Cleaning columns you will never use. Delete irrelevant columns early so alerts focus on what matters.
- Skipping the final re-profile, so a bad find-and-replace goes unnoticed.
Frequently asked questions
How do I clean a CSV file without Excel?
Upload it to an online tool that profiles and edits the data directly. In TensorTurn you upload the CSV, read the column profile and alerts, and describe fixes in plain English in the AI data editor, then approve the planned steps. Nothing needs to be opened in a spreadsheet app, which also avoids Excel reformatting dates and IDs.
Why does my CSV show strange characters?
This is almost always an encoding mismatch, for example a file saved in a legacy Windows encoding being read as UTF-8. Re-export or re-save the file as UTF-8 from the source system or a text editor, then upload it again.
How do I convert text like "$1,234" to numbers in a CSV?
You need to strip the currency symbol and thousands separator, then cast the column to a numeric type. TensorTurn's one-click auto-fix parses values such as "$1,234.56", "1,234,567", "50%" and "(1234)" into numbers for you.
Does TensorTurn see all of my CSV data when I use the AI editor?
No. The AI receives the column profile and a tiny sample so it can plan the steps. The rows stay in your browser, where profiling runs and the approved operations are applied.
Can I clean TSV, JSON or Parquet files the same way?
Yes. TensorTurn accepts CSV, TSV, JSON and JSONL, Parquet and Excel files, and they all open in the same profiling view and AI data editor.