tsvkit.org
TSV Toolkit
Sample data Say hi →

Filter TSV Rows

small expression language · AND / OR with parentheses · regex support

Keep only the rows that match a condition, written as a short expression rather than assembled from dropdowns. status = "active" AND age > 30 does what it looks like: bare words are column names, quoted strings are literals, and clauses combine with AND and OR. It's the fastest way to answer "how many rows look like this?" without loading the file into anything.

filter
Drop a .tsv file here, or
ready

How to use

  1. Paste or drop the file. The header row supplies the column names you can reference.
  2. Write the expression in the Where box. Quote string values; leave numbers bare.
  3. Tick case-sensitive if Active and active should be different.
  4. Read the row count in the status line, then copy or download the matching rows.

The expression syntax

Operators: =, !=, >, <, >=, <=, contains, and ~ for a regular expression. Combining: AND binds tighter than OR, and parentheses override that — (role = "admin" OR role = "owner") AND active = "true". Values: double-quoted for strings, bare for numbers; a bare word is read as a column name.

Comparisons are numeric when both sides look numeric and textual otherwise, so age > 30 works on a column of numbers and name > "m" works alphabetically on a column of text.

Examples worth stealing

status = "active" — exact match. age > 30 AND country = "UA" — numeric and string together. name contains "smith" — substring, no wildcards needed. email ~ "@example\\.com$" — regex, anchored to the end. notes != "" — rows where a field is populated. Invert it (notes = "") to find the gaps, then fill or remove them.

FAQ

Nothing matches and I expected rows to.

Usually invisible whitespace or line endings: a value that's really "active " or "active\r" won't equal "active". Run trim columns and normalise line endings, then try again. Value counts shows you the actual values in the column.

Can I filter on a column with a space in its name?

Not reliably — bare words are parsed as identifiers. Rename it first with header tools (snake_case does it in one click), or reference the column by its 1-indexed position if the tool accepts it.

How do I keep the rows that don't match?

Invert the expression — != instead of =, or wrap the whole thing and flip the operators. There's no NOT keyword.

Is this faster than grep?

No, but it's more correct: grep matches anywhere in the line, so searching for 30 also matches an ID containing 30. Filtering by column avoids that entirely.

Privacy

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