tensorturnBETA
Home › Data Cleaning & Analytics

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

ProblemSymptomFix
Wrong encodingCharacters like "é" instead of "é", or replacement symbolsRe-save or re-export the file as UTF-8 before uploading
Wrong delimiterEverything lands in one column, or columns split mid-valueRe-export with commas or tabs; save tab-separated data as TSV
Extra lines above the headerColumn 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 namesColumns called "Unnamed" or two columns with the same nameRename columns to unique, descriptive names
Leading or trailing spacesTwo categories that look identicalTrim whitespace
Formatted numbers"$1,234.56", "1,234,567", "50%", "(1234)" read as textStrip formatting and cast to number
Placeholder values"N/A", "-", "null", "?" inside numeric columnsFind and replace placeholders, then cast to number
Duplicate rowsRow count higher than expected, duplicate alertDrop 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

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

Start building free

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.