csvkit.org
CSV (Comma-Separated Values) utilities, in the browser
Say hi →

Group & Aggregate a CSV

group by any columns · count · sum · avg · min · max · distinct · list

Collapse a CSV into one row per group and aggregate the columns you care about — total revenue per country, orders per customer, average response time per endpoint. It's the GROUP BY you'd write in SQL or the subtotal you'd build with a pivot table, without either.

group by
group these columns
aggregate these columns
Or drop a .csv file here, or
ready

How to group a CSV

  1. Paste the CSV or drop a file — the column checkboxes appear automatically.
  2. Tick the columns to group by. Tick more than one for a compound group, like country + month.
  3. Tick each column you want to aggregate and pick how: sum, avg, count, min, max, first, last, list, or distinct.
  4. Every output row includes row_count, so you always know how many source rows each group represents.

What each aggregation does

Group by month, not by timestamp

Grouping on a raw timestamp gives one group per row, which is never what you want. Trim the value to the granularity you need first — Split column can cut 2026-03-14T09:12:00Z down to 2026-03 or 2026-03-14, and then grouping behaves. For anything more involved, SQL on a CSV lets you write the expression directly.

FAQ

How is this different from a pivot table?

Group-by produces one row per group with columns for each aggregate — a long, tidy table. A pivot table spreads one column's values across the top to make a matrix. Same data, different shape.

Can I sum a currency column with $ signs?

Strip the symbol first with Find & replace. Values like $1,200 aren't numbers; 1,200 is handled, $1,200 is not.

My groups are duplicated — "Kyiv" and "kyiv" separately.

Grouping is exact and case-sensitive. Normalise the column first — Trim whitespace for stray spaces, or Find & replace for casing.

Is anything uploaded?

No. Grouping happens in your browser; the file never leaves your machine.

Privacy

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