Skip to content

Browser tool

Keep the first copy of each distinct CSV row

Compare every cell in each data record, keep the first occurrence in source order and trace each repeated row to the record that was kept.

Review exact rows

Compare every cell exactly. Keep the first copy in source order and see which later records match it.

Use UTF-8 text with one delimiter. Limits: 100,000 characters of input in total (some characters count as two), 2,000 data records and 64 columns.

With headings enabled, record 1 is copied to the output and comparisons start at record 2. Otherwise, comparisons start at record 1.

Input 1

Enable JavaScript to use this tool in this tab.

Open a file, paste text or try the sample.

Choose where the data starts

Open a UTF-8 file or paste a table, choose its delimiter and indicate whether record 1 contains headings. With headings enabled, the first record is carried into the output once and comparison starts at record 2.

Compare complete rows

Two rows match when every decoded cell contains the same string in the same column. Spaces, letter case and leading zeros all matter. CSV quotes around a field are syntax. A quoted value and an unquoted value can represent the same text.

Trace a repeated row

The first copy stays in place relative to the other retained records. Each later copy points back to the number of that first input record. Record numbers start at 1 and count a multiline quoted field within a single record.

Save the evidence

The CSV contains the retained table and prefixes formula-like cells with an apostrophe. JSON records the exact original strings, the original numbers of retained records and the first copy for every repeat. Identical rows can describe separate events. Check the source before using the shorter table.

Work through an example