CSV / TSV

CSV cleanerprepare records for the next import

Build a sequence of row and column operations, then review and apply it as one change.

CSV cleaner

CSV source

Your CSV stays in this browser; no data is uploaded.

Result table

RowColumn 1Column 2Column 3
1idnameteam
2007AdaBlue
3003GraceRed
4007AdaBlue
5
6010LinBlue
Showing 6 of 6 visible records; 6 records in the result.
Read settings

Cleaning steps

Use 1-based positions at this step, separated by commas. Leave blank only for whole-row deduplication. Reorder must list every column once.

No cleaning steps yet. Add an operation, then preview the complete sequence.

    Search is case-sensitive and never changes the exported rows.

    Input or steps changed. Preview and apply before exporting.

    A contact export can contain repeated IDs alongside fields you no longer need. The CSV cleaner lets you choose the comparison columns and inspect which records survive before replacing the source.

    Clean CSV online when an import expects a different column order or a smaller set of records. Values remain strings, so account codes with leading zeros keep their meaning while you reshape the table.

    Why use this CSV cleaner

    Choose which record survives

    Sorting before deduplication changes which matching record comes first. The CSV cleaner executes your steps in order and keeps that first occurrence. Preview the row counts before accepting a sequence that removes duplicate rows.

    Repeated and empty table rows removed while the first matching record remains

    Move values with their columns

    Extract the third and first columns in that order, then rename the new first header. The preview makes the resulting structure visible. Each later operation refers to the positions that exist at that point in the sequence.

    The third and first colored columns retained in that order, with the middle column removed

    Understand the sequence before applying it

    01

    Set the record boundary

    Choose the separator and whether the first record is a header. A quoted newline belongs inside its cell. Only a single empty-field record can be expanded to the table width; other mismatched records stop the preview.

    02

    Check positions after every column change

    Column numbers start at 1 and refer to the current step. Extracting 3,1 makes the original third column become column 1. A reorder step must name all current columns exactly once.

    03

    Apply once, then check the exported scope

    Preview manually or press Ctrl/Cmd+Enter. Applying replaces the source and clears the steps. Undo restores the previous source, result and steps. Search narrows the displayed table only; downloads include the full applied result.

    Combine selective row and column operations

    Precise duplicate keys

    Select one or several current columns, or leave the selection blank to compare the entire row. Matching preserves case, whitespace and empty key values. The first occurrence at this step remains.

    Keep records that meet a condition

    Filter CSV rows by contains, does not contain, equals, differs, empty or nonempty on one column. Consecutive filter steps narrow the result further; changing the table search never adds a filter step.

    Shape the import schema

    Extract an ordered subset, remove unwanted columns, rename a header or reorder CSV columns completely. Header names may repeat because steps use positions, not a name-to-value object.

    Review text order and counts

    Sort a selected column ascending or descending with stable string comparison. Equal values retain their relative order. The preview reports removed rows, moved rows, removed columns and changed cell positions for each step.

    Know what will remain unchanged

    Empty is different from whitespace
    An empty row has only empty-string cells. A cell containing a space, 0 or the text null is not empty. There is no automatic trimming, case folding or merging of conflicting duplicate values. A whitespace-only record with too few fields still fails the width check.
    Strict structure with one empty-record exception
    A data record parsed as one empty field can be expanded to the table width; the preview reports that count. All other unequal widths and invalid quotes fail. With headers off, the first nonempty record sets the width.
    Limits apply to the entire result
    Input and output each allow 2 MiB of UTF-8 text, up to 2,000 records including a header, 100 columns and 50 steps. Paste text directly; this page does not import files or save sessions.
    Text sorting does not infer numbers
    Ordering compares UTF-16 strings, so 10 comes before 2 in ascending order. Dates, long integers and leading zeros are not converted. Formula-like values are flagged but neither executed nor neutralized.
    Exports require a current applied result
    Changing source text, steps or read settings invalidates the result. Preview and apply again before copying or downloading. Serialization may rewrite quoting and record endings; it does not promise identical original bytes.

    CSV cleaner questions

    Can I dedupe on multiple columns?

    Yes. Enter a comma-separated list of current column numbers, such as 1,3. The combination is the key: every selected value must match. Leave it blank for whole-row comparison.

    Will the original file order be preserved?

    Deduplication preserves the order at that step and keeps the first match. An earlier sort can change that order. To preserve the original record order, omit sorting from the sequence.

    What does "remove empty rows" do?

    It removes records whose cells are all empty strings. Whitespace-only cells remain. The CSV cleaner reports removed records; a quoted newline within a cell is not a separate empty record.

    How do I rename a column header?

    Enable the first-record header option, add Rename a header, enter the current column number and the new name, then preview. Apply only after checking the old and new headers.

    How do I reorder columns?

    Add Reorder all columns and list every current column position exactly once. To keep only a subset in a chosen order, use Extract columns instead. Removing every column is rejected.

    Did a cleaning step behave unexpectedly?

    Prepare the next import with confidence

    Try the CSV cleaner sample, add only the operations your destination requires, and inspect the full sequence before applying it.