I did a quick search and got these recommendations for cleaning CSV files - which is something I have to do often. Some of them might present you with options to control the format or structure of the data: I'm trialling OpenRefine (which is free).
- CSV Lint – Validates and cleans CSV files, checking for structural errors.
- TableConvert – Online CSV cleaner that can remove duplicates, fix formatting, and more.
- Opalytics Data Cleaner – Free online data wrangling tool by Trifacta.
- OpenRefine – Powerful data-cleaning tool for refining CSVs, removing duplicates, and standardizing data.
- LibreOffice Calc – Free alternative to Excel that allows manual cleanup.
- CSVed – Lightweight CSV editor with cleaning functions.