tsvkit.org
TSV Toolkit
Sample data Say hi →

Replace in TSV Column

find and replace inside one column · literal or regex

Search and replace within a single column, leaving the rest of the file untouched. That restriction is the whole value: a global find-and-replace across a TSV will happily rewrite text in columns you weren't thinking about, and there's nothing in the output to tell you it happened. Targeting one column keeps the change reviewable.

replace in column
Drop a .tsv file here, or
ready

How to use

  1. Paste or drop the file.
  2. Name the column by header or 1-indexed position.
  3. Type what to find and what to replace it with. Leave the replacement empty to delete the matched text.
  4. Tick regex for pattern matching, with $1 and $2 available in the replacement for captured groups.
  5. Copy or download.

What it's usually for

Normalising categoriesUNITED KINGDOM to UK so a group-by stops splitting the same thing in two. Find the variants first with value counts. Stripping symbols so numbers parse — removing $, %, or thousands separators, which is what stands between a text column and a numeric one. Follow with round numbers or the schema generator to confirm the column now types as numeric. Converting sentinels to real blanks — turning N/A or -999 into empty cells so stats counts them as nulls instead of values. Fixing a decimal separator — a European export using 3,14 needs the comma replaced with a period before anything will do arithmetic on it.

Regex notes

The pattern is a JavaScript regular expression applied to each cell's whole value, replacing every match. Anchors work as expected: ^0+ strips leading zeros, \s+$ strips trailing whitespace (though trim columns is simpler for that). Capture groups are referenced as $1 in the replacement, so finding (\d{4})-(\d{2}) and replacing with $2/$1 reorders a date fragment.

One trap worth naming: if your data contains backslashes and you're replacing them, do it in one pass with a single pattern rather than two sequential replacements — the second pass will see the output of the first. That's why unescape tabs exists as its own tool rather than being two replacements.

FAQ

Can I replace across every column at once?

Not here — one column per pass, deliberately. Run it several times for several columns; the small friction is what stops accidental collateral edits.

Is the match case-sensitive?

Yes for literal matching. In regex mode you can prefix a pattern with (?i) in engines that support it, or write a character class like [Uu][Kk].

Does it touch the header?

No — only data rows. To rename the column itself, use header tools.

My regex isn't matching.

Check for whitespace in the cell that isn't visible — value counts shows the actual distinct values. Also remember the pattern is applied per cell, so ^ means the start of the cell, not the start of the line.

Privacy

100% client-side. No upload. See the privacy policy.