Remove duplicate CSV rows

Remove repeated rows from a CSV while keeping its header, original order and first occurrence of each exact record.

Paste data or open a UTF-8 file up to 1 MiB. Processing takes place on this device.

Worked example

Input

ID,Team
007,North
007,North
008,North

Result

ID,Team
007,North
008,North

Will two rows with the same ID be merged?

Every cell in a row must match for a duplicate to be removed. If two records share an ID but have different team names, both survive. Trim whitespace first if outer spaces should be ignored.