Keep latest row per ID in CSV
Remove duplicate CSV records by one or more ID columns while keeping the row with the latest or earliest date. Download selected, removed and review rows with a decision report.
Your results
Keep latest row per ID in CSV
When a customer, product or form submission appears more than once in a CSV export, choose the ID columns and a date column that decide which complete row survives. The default keeps the latest valid date. A separate decision report records every source row, and tied groups wait for review instead of being silently discarded.
How to use this tool
- Upload a UTF-8 CSV, import a direct public CSV URL, or paste a short CSV after the upload options. Try the example with two purchases and a date tie.
- Enter the ID column names and the YYYY-MM-DD date column. Choose latest or earliest, key normalization and how to handle tied dates.
- Download selected rows, removed rows, rows needing review and the decision report. Check every tied group before replacing your original export.
Supported input formats
CSV
Available settings
- Date column
- Which row to keep
- Key matching
- Rows with the same selected date
Output and limitations
Remove duplicate CSV records by one or more ID columns while keeping the row with the latest or earliest date. Download selected, removed and review rows with a decision report.
One UTF-8 comma-separated CSV up to 5 MB, 10,000 data rows and 100 columns; pasted text up to 12,000 characters. Dates must be valid YYYY-MM-DD values. Blank keys or dates stop processing. A tie on the selected date goes to needs-review.csv by default, so that group is excluded from selected-rows.csv until you decide. First/last tie breaking is available explicitly. Original row order and whole-row values are preserved. CSV exports protect formula-like cells. Excel serial dates and timestamps are unsupported.
What happens if two rows have the same latest date?
By default, every row in that ID group goes to needs-review.csv and no row from that group appears in selected-rows.csv. You can instead choose first or last row as an explicit tie rule. The report shows the original CSV row numbers.
Does this combine missing values from older rows?
No. It keeps one whole source row per unambiguous key and date. It never merges cell values across records. Back up the original CSV and review the separate output files.
What if processing fails?
Check the supported formats and file limits, then try a smaller file. Keep an original copy. A clear error message will explain an unsupported input or an unavailable processing service.