CSV deduplication guide
How to remove duplicate rows from a CSV safely
A duplicate is only meaningful after you choose the comparison rule. Compare every column for exact duplicate rows, or select keys such as Order ID. For each matching key, LocaCSV keeps the first row in input order.
Example: one row per order
An export contains Order ID O-102 twice. If the newest row should survive, sort by Updated at descending before deduplicating.
- Comparison key: Order ID
- Case-sensitive comparison
- Keep the first occurrence
Input with a repeated order
Read both O-102 records across all four columns. They match exactly. In an order export with one row per product, the same order ID can also appear on different line items. In that case, compare all columns or include the line-item ID in the key.
Order ID,Customer,Amount,Status
O-101,Northstar Labs,128.00,Paid
O-102,Maple Supply,84.00,Paid
O-102,Maple Supply,84.00,Paid
O-103,Harbor Foods,62.00,PendingCSV after deduplication
Here four data rows become three. Try changing only the status in the second O-102 on a copy. Comparing all columns then keeps both versions. Comparing Order ID keeps the earlier row in the file, even if the later one has the status you need.
Order ID,Customer,Amount,Status
O-101,Northstar Labs,128.00,Paid
O-102,Maple Supply,84.00,Paid
O-103,Harbor Foods,62.00,PendingRemove duplicates in five steps
Keep the original file until you have reviewed the result.
- Open Remove duplicates and choose one CSV up to 500 MB.
- Confirm the encoding, delimiter, headers, and preview.
- Compare all columns or select one or more key columns.
- Choose whether letter case matters, then run the operation.
- Before downloading, confirm every input row is either kept or removed as a duplicate.
Verify the rows that remain
Confirm that three of the four input rows remain and one was removed, then sample the result to make sure the right row remains.
- Every input row is either kept or removed as a duplicate
- The first row for a repeated key remains
- Blank keys compare equal to other blank keys
- Spaces and look-alike characters written in different forms are not changed
Common deduplication mistakes
Deduplication does not perform fuzzy matching or clean inconsistent values.
- Using Customer Name alone and removing different customers
- Treating O-102 and o-102 as equal while case sensitivity is on
- Leaving trailing spaces that create separate keys
- Expecting the latest row to remain without sorting first
When to use this tool
Use deduplication to reduce repeated rows. Use Filter rows for a condition, or Merge CSV files to stack separate exports.
- Good fit: consistent order or customer IDs
- Good fit: fully identical rows
- Sort first: control which version remains
- Not a fit: fuzzy name or address matching