How to Clean Marketing Campaign Data in a CSV
Campaign exports are messy by default. Here is a short routine that turns one into a file you can trust.
A campaign export from an ad platform, a CRM or an email tool usually has the same problems: dates in two formats, campaign names with extra spaces or different capitals, empty cells where a metric is missing and duplicate rows from a merged export. Each one quietly changes a total.
Start by looking before you change anything. Open the file in the Data Profiler. It shows the type of each column, the number of blank cells and duplicate rows, and unusual values, so you know what needs fixing. Keep a copy of the original file.
Then work through the fixes in Data Transformation. Trim spaces so that Spring Sale and Spring Sale with a trailing space become one campaign. Change the text case so that names match. Change the date format to one standard such as YYYY-MM-DD, and choose whether an unclear date such as 03/04/2026 means day first or month first. Remove duplicate rows, and use Remove empty values for rows with no data.
Decide what blank means. A blank spend may mean zero or missing. Use Fill empty cells only when you know the answer, and write down your choice. Filling a metric with zero changes averages.
Finally compare the cleaned total with the original. Clicks, impressions and spend should match the platform unless you deliberately removed rows. Data Lineage keeps a record of each step, which helps when someone asks why a number changed. The work runs in your browser and the file is not uploaded.
Related tool pages
- Delete Columns from a CSV File: Remove one or more columns from a CSV or Excel file and download the result. Free, in your browser, and your file is never uploaded.
- Reorder Columns in a CSV File: Drag columns into a new order, or send a column to the start or the end, in a CSV or Excel file. Free, in your browser, nothing is uploaded.
- Remove Empty Rows and Columns from CSV: Remove rows with empty cells, rows that are completely empty, or columns with no values from a CSV or Excel file. Free, in your browser.
- Find and Replace in a CSV File: Find and replace text in a column of a CSV or Excel file, then download the result. Free, in your browser, and nothing is uploaded.
- Change Date Format in a CSV File: Change the date format of a column in a CSV or Excel file, for example 09/03/2026 to 2026-03-09, or get only the year or month. Free, in your browser.
- Convert Excel Date Numbers to Dates: Turn Excel date numbers such as 46090 and unix timestamps into readable dates in a CSV or Excel file. Free, and your file stays in your browser.
How to use the Data Transformation: step by step
- Open the file in the Data Profiler and note the problems.
- Open Data Transformation and add Trim spaces, Change text case and Change date format.
- Add Remove duplicate rows and Remove empty values.
- Download the clean file and compare totals with the original.
When to use the Data Transformation
- Prepare a monthly campaign report
- Merge exports from two platforms
- Remove duplicates from a lead list
- Standardise campaign names and dates
Example
Input: plans.csv + customers.csv, key = id
Output: id, first_name, plan, amount
Frequently asked questions
Which transformations are available?
Join with a second file (inner, left, right, full), trim spaces, concatenate columns, change case, find and replace, split a column, rename, remove columns, reorder columns, remove empty rows or columns, filter rows, remove duplicates, sort and fill empty cells.
Can I run several steps?
Yes. Steps run from top to bottom and each one sees the result of the one before. You can reorder or remove them.
Can I join two files or combine columns?
Yes. Data Transformation lets you join two CSV or Excel files on a key (inner, left, right or full), and trim spaces, concatenate columns, change case, find and replace, split, rename, filter, sort, remove duplicates and fill empty cells. You choose the steps, check the result and download it. Your files stay in your browser.
Can I change the date format of a column?
Yes. Add a Change date format step, pick the column and the new format, such as 2026-03-09, 09/03/2026 or March 9, 2026. It reads many layouts, Excel date numbers and unix timestamps, and can also give only the year, month, weekday or quarter. If 03/04/2026 is unclear, you choose day first or month first.
Tip: Never overwrite the original export. Save the cleaned file under a new name.