Offline CSV cleanup for contact lists, catalogue exports and administrative files. Keep 00123 as text, trim only selected columns, remove exact duplicates only when requested, and get a report of conflicting or missing keys.
Try the live example and download · Download the complete ZIP
Download first and test it on copies of your data. The requested one-time price is US$15 if you keep using it, payable through the product page. No subscription, activation or account is required to use the tools.
The complete ZIP includes the offline HTML tool, Python CLI, JavaScript source and tests, sample data, expected output and checksums. The files in this repository are convenient direct downloads; the ZIP contains the complete distribution.
AI-assisted software, supplied with source and tests. Keep your original and review the report before using the output.
- Extract this ZIP, then open CSV Fix Kit.html in a modern browser.
- Choose a UTF-8 CSV file, or paste CSV text. Select its delimiter and click Read columns.
- Check only the columns whose outer whitespace you want to trim.
- Optionally check one or more key columns to flag conflicting records and missing identifiers.
- Decide whether exact duplicate rows should be removed. Identical rows can represent separate valid events, so this is off by default.
- Click Clean and review. Inspect the counts, row preview and change report.
- Download cleaned.csv and report.json.
The HTML file contains all the code it needs. It works without an internet connection and does not upload your CSV, use analytics, store your data in browser storage, or make network requests. Closing or reloading it clears its in-memory data. Your browser handles the downloaded files; the tool never writes to your original CSV.
Browser limits: 5 MiB of UTF-8 input, 50,000 data rows and 256 columns. The preview shows the first 30 kept rows and shortens long cells for display; the export preserves full values and all kept rows. Use the Python tool for files outside the browser limits, subject to available memory.
Requires Python 3.10 or newer. No third-party packages or network access.
python3 clean_csv.py example.csv results --trim name --key id --drop-exact-duplicatesOn Windows, use py in place of python3 if that is your Python launcher. The results directory must not exist; its parent must exist. The tool creates:
cleaned.csv: original columns and row order, with only requested changes.report.json: counts, changed column names and source record locations, duplicate references, missing keys and conflicting-key groups.
Repeat --trim COLUMN or --key COLUMN to select multiple columns. Composite keys are supported. Use --delimiter ';' for semicolon-separated input. Other single-character delimiters are supported by the Python tool; the browser tool offers comma, semicolon and tab.
In example.csv, two rows become identical after trimming name. With name trimming, id key checking, and exact duplicate removal enabled:
- 4 input records become 3 output records.
- 2 names are trimmed and 1 duplicate is removed.
- Both distinct records for ID
00123remain. Different emails are flagged for review. - The row with a missing ID remains and is flagged.
Expected results are included in expected-example/. Record numbers count the header as record 1. Physical line numbers let you locate records containing quoted newlines.
All field values remain text, including leading-zero IDs, date-looking strings and formula-looking strings. No date, numeric, email or capitalization inference happens. Whitespace and duplicates remain unchanged unless you select the corresponding options. Matching is case-sensitive. Conflicting-key rows are flagged, never automatically merged or discarded.
Spreadsheet import: a spreadsheet application may interpret CSV fields as numbers, dates or formulas. Use explicit text-column import settings for identifiers and untrusted data. The kit does not sanitize spreadsheet formulas.
CSV quoting, quoted commas, multiline values, Unicode and a UTF-8 BOM are supported. Empty/duplicate headers, incorrect field counts and malformed quoting are rejected. Blank physical records are rejected; a quoted empty field is valid. A header-only file is valid. The browser parser rejects quote characters inside unquoted fields more strictly than Python's CSV parser.
Serialization can change quoting and line endings, but unmodified field values remain unchanged. Both tools read records into memory; neither is a streaming pipeline. Reports can contain key values, so treat reports with the same care as source data.
The Python tool validates input before creating its output directory. A filesystem write failure can leave an incomplete output directory; an unsuccessful exit must be investigated before using any output.
Python tests:
python3 -m unittest -vBrowser core tests (Node.js 20+):
node --test source/test-cleanup.mjsThe browser source is also readable inside the HTML file. The source/ folder includes the standalone module, UI, template and build script. To rebuild the HTML with Node.js, run node source/build-kit.mjs; it writes source/release/CSV Fix Kit.html.
Download first and evaluate it on copies of your data. If you keep using the kit, the requested one-time price is US$15. Payment instructions are on the product page. There is no subscription, account, activation server or installer.
You may use and modify the supplied source for personal projects and internal business workflows. Your input files and generated CSV/JSON outputs remain yours. The software is supplied as-is, without a promise that it will meet every workflow or prevent every data issue. No resale of support or ongoing maintenance is included.
Questions about this version or missing/damaged files: alvinhastra@gmail.com.
Version 1 ZIP: 24,289 bytes. SHA256:
36e208a9729844226da4b5c5dc74f0fc373fcb6e2ec467052ec06002a2431b22
The browser parser has 10 automated tests, including 120 deterministic CSV roundtrip cases; the Python tool has 8 automated tests. Tests cover identifiers, multiline fields, conflicting keys, invalid input, explicit transformations and source preservation.