CSV Column Replacer
Replace, modify, or overwrite values in specific CSV columns with find-and-replace, regex, or static values. Download the modified CSV instantly.
About
Bulk-editing a single column in a CSV file with a text editor risks corrupting adjacent fields, especially when values contain your delimiter or are wrapped in quotes per RFC 4180. This tool parses your CSV into a structured grid, isolates the target column by index or header name, and applies replacement rules - literal string swap, regex pattern substitution, or full-column overwrite with a static v. The parser handles quoted fields, escaped double-quotes (""), and embedded newlines correctly. Delimiter is auto-detected from comma, semicolon, tab, and pipe by frequency analysis of the first 5 rows.
Limitations: this tool operates entirely in-browser memory. Files exceeding 50 MB are rejected to prevent tab crashes. Encoding is assumed UTF-8. If your CSV uses a BOM or non-UTF-8 encoding, results may contain artifacts. Pro tip: always verify the preview table before downloading - column indices are 0-based, and an off-by-one error in column selection will silently corrupt the wrong field.
Formulas
The delimiter auto-detection algorithm scores each candidate delimiter by counting occurrences per row and selecting the one with the lowest variance (most consistent column count):
Where d is the candidate delimiter from the set {, ; \t |}, countd,row is the number of times delimiter d appears in that row (outside quoted fields), and the delimiter with the lowest score and at least 1 occurrence is selected.
For regex replacement, the engine applies the JavaScript String.prototype.replace with a constructed RegExp object using the global flag:
Where pattern is the user-supplied regex and replacement may contain capture group references $1, $2, etc.
Reference Data
| Replacement Mode | Input Required | Behavior | Use Case |
|---|---|---|---|
| Find & Replace (Literal) | Search string + Replacement string | Case-sensitive exact match within cell value | Fix typos, rename categories |
| Find & Replace (Case-Insensitive) | Search string + Replacement string | Case-insensitive match within cell value | Normalize inconsistent casing |
| Regex Replace | Pattern + Replacement (supports $1 groups) | Full regex substitution per cell | Strip prefixes, reformat phone numbers |
| Overwrite Entire Column | Static value | Every cell in the column becomes the static value | Set default status, clear a column |
| Conditional Replace | Condition pattern + Replacement value | Only replaces if cell matches the condition | Replace only empty cells or specific values |
| Prepend | Prefix string | Adds prefix to start of every cell value | Add country codes, URL prefixes |
| Append | Suffix string | Adds suffix to end of every cell value | Add file extensions, units |
| Clear (Empty) | None | Sets every cell in the column to empty string | Remove sensitive data before sharing |
| Trim Whitespace | None | Strips leading/trailing whitespace from each cell | Clean imported data |
| Uppercase | None | Converts entire cell to uppercase | Normalize codes, SKUs |
| Lowercase | None | Converts entire cell to lowercase | Normalize emails, slugs |
| Title Case | None | Capitalizes first letter of each word | Format names, titles |