≠

CSV Duplicate Remover

Remove duplicate rows using a selected key column

No file selected.
—

CSV Duplicate Remover — what it does

Choose a key column and the tool removes rows that repeat a value in it, keeping either the first or the last occurrence. Which one you keep matters: first preserves the original record, last preserves the most recent update, and the choice determines what your cleaned file actually says.

Worked example

A lead list in which two email addresses were entered more than once, cleaned on the email column with Keep last occurrence so the most recent edit survives.

Input — leads.csv

lead_id,email,company,updated
L-01,ann.lee@example.com,Acme Ltd,2026-09-02
L-02,ben.ortiz@example.com,Borealis GmbH,2026-09-03
L-03,ann.lee@example.com,Acme Ltd,2026-09-15
L-04,chloe.park@example.com,Cedar Co,2026-09-16
L-05,ben.ortiz@example.com,Borealis Group,2026-09-20
L-06,dev.patel@example.com,Delta LLC,2026-09-21

Output — deduplicated.csv

lead_id,email,company,updated
L-03,ann.lee@example.com,Acme Ltd,2026-09-15
L-04,chloe.park@example.com,Cedar Co,2026-09-16
L-05,ben.ortiz@example.com,Borealis Group,2026-09-20
L-06,dev.patel@example.com,Delta LLC,2026-09-21

The page reports 6 → 4 rows. Surviving rows keep their original relative order, which is why L-03 now comes first; the file is always named deduplicated.csv.

When this tool helps

  • Cleaning a mailing list where the same address appears several times from different sign-up sources.
  • Deduplicating an order or transaction export after a retry produced repeated records.
  • Keeping only the latest status row per identifier when a log file appends one line per change.

How to use it

  1. Choose the CSV file.
  2. Select the column that identifies a duplicate.
  3. Decide whether to keep the first or the last occurrence.
  4. Process and download the deduplicated CSV.

Accuracy, limits, and good practice

  • Matching is exact, so trailing spaces or different capitalisation will hide duplicates — normalise the key column first if it is user-entered.
  • Keep last only works as intended if the file is already in chronological order; sort by date before deduplicating a log.
  • Rows that differ in other columns are still dropped when their key matches. Check what you are discarding before overwriting the source.

Frequently asked questions

Can I deduplicate on several columns at once?

This tool uses one key column. Merge the fields into a composite key first with the column merger, then deduplicate on that.

How do I see what was removed?

Compare the original with the result using the CSV file difference tool, which lists rows present in one file and not the other.

Are blank keys treated as duplicates?

Rows with an empty key share the same value, so all but one will be removed. Filter blanks out first if you need to keep them.

Does Keep last occurrence reorder the file?

No. Each surviving row stays where it was in the source, so the output is the original order with the dropped rows removed, not the order in which the last occurrences were found.

Is the download UTF-8 with a byte-order mark?

It is UTF-8 without a byte-order mark. If Excel shows accented names incorrectly when you double-click the file, open it through Excel's import dialog and choose UTF-8.

Related tools on this site

Everything above runs inside this page. CSV Duplicate Remover needs no account, no upload, and no server round trip — close the tab and nothing is left behind.

CSV 重複資料移除能做什麼

選定一個鍵值欄位,工具會移除該欄重複的列,並可選擇保留第一筆或最後一筆。保留哪一筆很關鍵:保留第一筆是留住原始紀錄,保留最後一筆是留住最新更新,這個選擇直接決定清理後的檔案在說什麼。

實際範例

潛在客戶名單裡有兩個 email 被重複登錄,以 email 欄去重並選「保留最後一筆」,讓最新的修改留下來。

來源:leads.csv

lead_id,email,company,updated
L-01,ann.lee@example.com,Acme Ltd,2026-09-02
L-02,ben.ortiz@example.com,Borealis GmbH,2026-09-03
L-03,ann.lee@example.com,Acme Ltd,2026-09-15
L-04,chloe.park@example.com,Cedar Co,2026-09-16
L-05,ben.ortiz@example.com,Borealis Group,2026-09-20
L-06,dev.patel@example.com,Delta LLC,2026-09-21

得到:deduplicated.csv

lead_id,email,company,updated
L-03,ann.lee@example.com,Acme Ltd,2026-09-15
L-04,chloe.park@example.com,Cedar Co,2026-09-16
L-05,ben.ortiz@example.com,Borealis Group,2026-09-20
L-06,dev.patel@example.com,Delta LLC,2026-09-21

頁面顯示 6 → 4 rows。留下的列維持原本的相對順序,所以 L-03 現在排第一;檔案一律叫 deduplicated.csv。

什麼時候用得上

  • 清理來自不同註冊來源、同一信箱重複出現的名單。
  • 在重試造成重複紀錄後,清理訂單或交易匯出檔。
  • 日誌每次變更就附加一行時,只保留每個識別碼的最新狀態。

使用步驟

  1. 選擇 CSV 檔案。
  2. 選定判斷重複的鍵值欄位。
  3. 決定保留第一筆或最後一筆。
  4. 執行處理並下載去重後的 CSV。

精確度、限制與實務建議

  • 比對是完全相符,尾端空白或大小寫不同會讓重複值被漏掉;若鍵值由使用者輸入,建議先統一格式。
  • 「保留最後一筆」只有在檔案本來就依時間排序時才符合預期,處理日誌前請先依日期排序。
  • 只要鍵值相同,即使其他欄位不同的列也會被刪除。覆蓋原始檔前請先確認刪掉的是什麼。

常見問題

可以同時用多個欄位判斷重複嗎?

本工具使用單一鍵值欄位。請先用欄位合併工具組出複合鍵,再以該欄位去重。

怎麼知道刪掉了哪些列?

用 CSV 檔案差異比較工具把原檔與結果比對,即可列出只存在於其中一邊的資料列。

空白鍵值算重複嗎?

鍵值為空的列彼此視為相同值,因此只會保留一列。若需要全部保留,請先把空白列篩出來。

選「保留最後一筆」會打亂順序嗎?

不會。每一筆留下的列都停在來源裡原本的位置,得到的是去掉重複後的原順序,而不是依最後一筆被找到的先後排列。

下載檔是帶 BOM 的 UTF-8 嗎?

是不帶 BOM 的 UTF-8。若直接雙擊檔案時 Excel 把帶重音的名字顯示成亂碼,請改以 Excel 的「取得資料」功能開啟並指定 UTF-8。

本站相關工具

以上步驟全部在這個頁面內完成,CSV 重複資料移除 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。