Two quick, safe cleanup commands for .csv files in Visual Studio Code.
Features
Right-click any .csv file in the Explorer (or in the editor) and pick:
CSV Clean: Remove Duplicate Rows — keeps the first occurrence of each unique
row (full-row, case-sensitive compare).
CSV Clean: Trim Whitespace — trims leading/trailing whitespace in every cell
and collapses runs of spaces/tabs to a single space.
A .bak copy of the original file is always written next to the file before
any change is made.
The same commands are also available from the Command Palette
(Ctrl+Shift+P → "CSV Clean").
CSV format support
Comma delimiter
RFC 4180 quoting ("...", "" escape, embedded commas and newlines)
UTF-8 (with or without BOM)
Preserves the original line-ending style (CRLF / LF)
Privacy
This extension does not collect telemetry, does not make any network
requests, and does not read or modify files other than the one you
explicitly act on.
More tools
Need to clean, split, or transform CSV files outside of VS Code? Check out
more handy utilities at xlclick.com.