CSV cleanup tool for files that won't import
The import failed again: "é" where accents should be, semicolons instead of commas, a few rows with an extra column, and a report title sitting above the header. Attach the file and this to-do has your todo.is agent repair the structure, fix the encoding and format the columns to match where the CSV is going, so it imports on the first try.
The prompt
- Clean up the attached CSV [FILE NAME] so it imports into [WHERE IT IS GOING]. Detect and fix the encoding (output UTF-8 and fix garbled characters like "é"), detect the delimiter and output [DELIMITER], remove title rows above the header and summary rows at the bottom, fix rows with too many or too few columns (quoted commas, line breaks inside cells), make header names [HEADER STYLE], trim spaces, remove empty columns and rows, and format dates as YYYY-MM-DD and decimals with a dot. If the destination has a required column list, match it: [REQUIRED COLUMNS]. Give me the clean CSV, a short report of every fix, and a list of rows you could not repair.
What to change
- [FILE NAME]: Attach the CSV, e.g. "export_orders.csv". TXT and TSV files work too.
- [WHERE IT IS GOING]: e.g. "Shopify product import", "Mailchimp audience", "a PostgreSQL table" or "Excel".
- [DELIMITER]: Usually "comma". Some European Excel setups need "semicolon".
- [HEADER STYLE]: e.g. "snake_case like first_name", "keep as they are" or "match the Shopify template".
- [REQUIRED COLUMNS]: e.g. "Email, First Name, Last Name, Tags", or "none".
Example result
- export_orders_clean.csv (example)
- Destination: PostgreSQL table "orders" · rows in: 8,431 · rows out: 8,427
- What was wrong and what was fixed
- • Encoding: the file was Windows-1252 but read as UTF-8, so "Müller" showed as "Müller". Re-encoded to UTF-8. 612 names fixed
- • Delimiter: semicolons, with commas as decimal marks ("12,50"). Output is comma-separated with dot decimals ("12.50")
- • Extra rows: removed 3 title lines above the header ("Order export, generated 08.10.2026...") and a "Total" row at the bottom
- • Broken rows: 14 rows had a comma or line break inside the address. Wrapped those cells in quotes so each row has 11 columns
- • Headers: "Order No.", "Customer E-Mail", "Date of Order" → order_no, customer_email, order_date
- • Dates: "08.10.2026" → 2026-10-08
- • Empty column removed: a column with no header and no data
- • Line endings: standardized to LF
- First lines of the clean file
- order_no,order_date,customer_email,customer_name,city,total,currency
- 10452,2026-10-08,j.muller@example.com,Jana Müller,Köln,12.50,EUR
- 10453,2026-10-08,p.dubois@example.com,Pierre Dubois,Lyon,89.00,EUR
- Rows not repaired
- • Line 3,912: 17 fields, looks like two orders merged into one line
- • Line 7,005: order_date "31.02.2026", not a real date
- They are in rows_to_check.csv. Fix them by hand or tell me what to do with them.
How to do it with todo.is
- Attach the problem CSV and copy the prompt with the destination it must fit.
- Paste it into todo.is, or send the file to your agent on Telegram or by email.
- Your agent detects encoding and delimiters, repairs the rows and checks the column count on every line.
- Import the clean file. If the destination rejects something, paste the error message and your agent fixes it.
Tips for a better result
- Name the destination. Shopify, Mailchimp and databases each expect different headers and formats.
- Opening a CSV in Excel and saving it again can change dates and drop leading zeros. Send the original export instead.
- If you have the import template, attach it too so the columns match exactly.
- For a weekly export that always breaks the same way, make it a recurring to-do with the same rules.
CSV cleanup tool: FAQ
- Why does my CSV show strange characters like é? The file was saved in one encoding (often Windows-1252) and opened as another (UTF-8). Re-encoding it correctly restores the accents.
- How do I fix a CSV with semicolons instead of commas? Your agent detects the semicolon delimiter and rewrites the file with commas, converting decimal commas to dots so numbers stay correct.
- Why does Excel remove leading zeros from my CSV? Excel treats values like 00123 as numbers. Import the column as text, or keep the CSV and use it directly in the destination tool.
- Can it clean a very large CSV? Yes, up to 50 MB per upload. Your agent processes it with scripts, so millions of cells are fine.
JavaScript is required to use the todo.is app.