Utility

CSV Filter & Sort Tool

Filter and sort CSV data with simple rules, no software needed

CSV Filter & Sort Tool

The CSV Filter & Sort Tool lets you query plain-text CSV data directly in your browser — no spreadsheet software, no database, no installation required. Paste your CSV, write filter rules in a simple syntax, specify sort columns, and get filtered results instantly. Your data never leaves your device.

How to Use This Tool

  1. Paste your CSV — the first row is treated as the header. Columns are referenced by their header names.
  2. Write filter rules — use the format column operator value, separated by semicolons for multiple conditions. Example: age>30; country=USA.
  3. Set sort columns — comma-separated column names to sort by. Prefix with - for descending order. Example: -score, name.
  4. Set row limit — cap the output at this many rows (0 = unlimited).

Filter Operators

The following operators are supported between a column name and a value:

  • = and == — exact match (case-insensitive for text)
  • != — not equal
  • > and >= — greater than (numeric or lexicographic for text)
  • < and <= — less than
  • contains — substring match (e.g., name contains Smith)

Multiple rules are ANDed together — a row must satisfy all conditions to appear in the output.

Sort Syntax

Enter comma-separated column names to sort by, in priority order. Add a - prefix for descending:
department, -salary sorts by department ascending, then by salary descending within each department.

Real-World Examples

Sales data: Filter to high-value orders: revenue>=10000; status=closed. Sort by -revenue. Export the result.

Employee directory: Filter department=Engineering; seniority>=3. Sort by name. Use for a department-specific report.

Log files: Filter severity=ERROR, sort by -timestamp to see the most recent errors first.

Frequently Asked Questions

What CSV format does this tool accept?
Standard comma-separated values with a header row. Quoted fields (fields containing commas, newlines, or quotes) are supported. Each column is referenced by its header name in filter and sort rules.
Are filter comparisons case-sensitive?
Equality checks (= and !=) are case-insensitive for text. "USA", "usa", and "Usa" all match =USA. The contains operator is also case-insensitive. Numeric comparisons treat values as numbers where possible.
Can I filter on multiple columns at once?
Yes. Separate filter rules with semicolons. All rules are combined with AND logic, so a row must satisfy every rule to be included. Example: age>25; gender=F; country=Canada.
How does numeric vs. text comparison work?
If both sides of a comparison can be parsed as numbers, the tool performs numeric comparison. Otherwise it falls back to lexicographic (alphabetical) string comparison. So 9 < 10 numerically, but "9" > "10" lexicographically.
Can I sort by multiple columns?
Yes. Enter comma-separated column names in sort priority order. The first column is the primary sort key. Rows equal on the first key are then sorted by the second, and so on. Prefix with - for descending.
Is there a row size limit?
The tool processes the CSV entirely in your browser. For very large files (100k+ rows), processing may take a second or two. The row limit field caps output rows without limiting parsing, so filtering a 50k-row file to the top 100 results works fine.
Does my CSV data get sent to any server?
No. All processing happens in your browser using JavaScript. No data is transmitted to any server. This makes the tool safe for sensitive or confidential CSV data.
What if a column contains commas in the value?
Values containing commas should be quoted in your CSV: "Smith, John". The parser handles RFC 4180 quoting. In filter rules, the column value comparison strips quotes automatically.