Skip to content

Clean a messy CSV file

Exports from shops, banks and old systems rarely start at row one. There is a title line, a blank row, headers with spaces around them, amounts with dollar signs, and a total row that gets counted twice the moment you add a SUM.

Drop the file and the table is found wherever it starts. Blank rows and the title go, headers and values are trimmed, amounts and dates get real types, and the total row is used to check the data instead of staying inside it.

Drop files here

or browse your files

XLSX, XLS, CSV, TXT, PDF · up to 25 MB · 1 file without an account

Or try a sample:

Example: before and after

The export line, blank rows and the “Total” row are gone, “ Jane Cooper ” is trimmed, and the total of $3,690.25 was checked against the four orders.

Beforeorders-export.csv
1Export generated 2026-03-31 by ShopDesk
2
3·Order ID··Customer·Order Date·Total·Status
41001··Jane Cooper·03/14/2026$1,240.00Paid
51002Devon Lane03/14/2026$89.50Paid
6
71003·Cody Fisher03/17/2026$2,315.75Paid
81004Kristin Watson·03/18/2026$45.00Refunded
9Total $3,690.25
After4 rows
Order IDCustomerOrder DateTotalStatus
1001Jane Cooper03/14/20261,240.00Paid
1002Devon Lane03/14/202689.50Paid
1003Cody Fisher03/17/20262,315.75Paid
1004Kristin Watson03/18/202645.00Refunded

How to do it

  1. 1Drop the CSV — any encoding, any separator (comma, semicolon, tab or pipe).
  2. 2Review the changes; switch off any step you don’t want.
  3. 3Download a CSV with the separator and encoding your system expects, or an XLSX.

Questions

Which separators and encodings work?
Commas, semicolons, tabs and pipes, quoted or not, in UTF-8, UTF-16 or older Windows and ISO encodings. The separator and encoding are detected from the content, not from the file name.
Will it delete rows I need?
Only rows that are clearly not data — blank lines, report titles, repeated headers, totals. Each removal is listed with the number of rows, and one switch brings them back.
Is the cleaned CSV safe to open in Excel?
Yes. Text that starts with =, +, - or @ gets an apostrophe in front, so a cell can never run as a formula.