How to clean, deduplicate and compare CSV files
To clean a CSV or TSV, load it into the first input, choose whitespace trimming and duplicate removal, then review and export the table. To compare two files, put the older data first, the newer data second and enter an exact unique key header. The CSV workspace reports added, removed and changed records locally in your browser. It keeps CSV values as strings so identifiers can retain leading zeros.
Prepare headers and check the input
The first row supplies column names. Headers must be non-empty and unique, and every row must contain the same number of cells. Quoted fields can contain delimiters and line breaks. Load a file or paste text into the corresponding input. If parsing reports a problem, inspect the delimiter, quotes and column count instead of exporting a table whose structure you have not checked.
Column names matter when selecting a key. A header named sku is different from SKU or a header with extra spaces. The trim option cleans cell values, not the headers. There is no visual column-renaming or mapping interface in this release, so correct headers in the source text if necessary. A consistent header row also makes the exported JSON easier to use.
Choose what duplicate means
Clean CSV can trim whitespace and remove duplicates. Without a matching key header, deduplication compares whole rows. With a matching key header entered, it keeps the first row for each key and removes later matching keys. These are different operations: two records can share an ID while containing different prices. Do not choose key-based deduplication unless keeping the first record is the intended policy.
For example, rows containing 001,Notebook,12 twice reduce to one row when whole-row duplicate removal is enabled. But 001,Notebook,12 and 001,Notebook,14 are different whole rows. Deduplicating by sku would keep the first and discard the second. Save your original file so you can review a cleaning decision later.
Worked example: compare by product code
Start with this older dataset in the first input and the newer dataset in the second. Enter sku as the key column and click Compare by key. Both tables have unique keys, so each product can be matched without guessing which record it represents.
Older:
sku,name,price
001,Notebook,12
002,Pencil,2
Newer:
sku,name,price
001,Notebook,14
003,Pen,4The report identifies a changed price for 001, from 12 to 14; an added record for 003; and a removed record for 002. The IDs remain strings, including their leading zeros. The report columns are status, key, column, before and after. A change produces a field-level entry, while added and removed records include a serialized representation of the corresponding row.
Comparison rejects blank or duplicate keys in either table. It does not run the cleaning options first: Compare by key parses the two inputs as supplied. If you clean a file separately, download that result and use it as an input for the comparison. Columns present in only one table are also considered, rather than silently ignored.
Convert and export the result
Download CSV, JSON or JSONL from the current result. JSON exports use the headers as property names and preserve CSV cell text. JSONL writes one object per line. The JSON → table button instead expects a non-empty array of objects in the first input. It uses the union of their keys; missing properties become empty cells and nested values become JSON strings.
Understand spreadsheet-safe export
Spreadsheet-safe CSV export is enabled by default. It prefixes formula-like values with an apostrophe to reduce the risk of spreadsheet formula execution. This deliberately changes those exported CSV cells. Disable it only when you trust the source and understand the destination. JSON and JSONL exports do not apply that CSV-specific protection. A preview is not a substitute for checking the file in the application that will consume it.
Limits to know
- The entire dataset is held in browser memory. Large files can slow or freeze a tab; there is no streaming or background-worker workflow.
- JSON array conversion follows JavaScript decimal precision. Unsafe parsed integer values are rejected; quote large identifiers as strings.
- The preview shows the first 100 rows, while downloads contain all processed rows. There is no saved cloud history.
Frequently asked questions
Will leading zeros in IDs be kept?
Yes. Values are read as text, so an ID like 00123 stays 00123.
Which row is kept when removing duplicates?
The first matching row is kept and later duplicates are removed.
Can I compare two CSV files?
Yes, by a key column such as an ID. Duplicate or blank keys are rejected, because they make the comparison unreliable.
How big can the file be?
The whole file is read into browser memory and the preview shows 100 rows. Very large files can slow or freeze the tab.