Skip to content

CSV Pivot Table

File Conversion Toolsβ€’Client-Side & Private

Turn a CSV into a pivot table: group by one or two columns, aggregate with sum, count, average, min, max or median, with totals and CSV or Markdown export.

Tool workspace
Real GROUP BY engine. The parser is quote-aware (RFC 4180): a quoted field may contain commas, doubled quotes and line breaks. Non-numeric values are ignored by sum/avg/min/max/median and counted by count/distinct.

10 data rows Β· 4 columns: Region, Product, Sales, Units.

Pivot β€” sum of Sales by Region Γ— Product

RegionGadgetWidgetWidget, DeluxeTotal
East1,100700β€”1,800
North8001,600β€”2,400
South9001,5002,5004,900
West6002,000β€”2,600
Total3,4005,8002,50011,700

Worked check on the sample: North Γ— Widget sums to 1,200 + 400 = 1,600; the grand total of Sales is 11,700. The quoted β€œWidget, Deluxe” row counts as one product, not two.

Loading tool controls…

Files processed locally β€” never uploaded to our servers
Free Instant Private

Verify it yourself: press F12, open the Network tab, and use this tool β€” your files are never uploaded.

CSV Pivot Table at a glance

Price
Free
Account
Not required
File uploads
None β€” your files are never uploaded

Who uses File Conversion Tools?

Anyone converting files between formats β€” images, data, encodings and colour values.

How to Use CSV Pivot Table

Follow these simple steps to get instant results in your browser.

1

Paste Your CSV

Paste a CSV with a header row β€” or use the sample, which includes a quoted field with a comma.

2

Pick Grouping and Aggregate

Choose the row column, an optional column column, the value column and the aggregate.

3

Read the Table and Export

Check the pivot with its totals, then export it as CSV or a Markdown table.

πŸ’‘

What is CSV Pivot Table & How Does It Work?

CSV Pivot Table turns a flat CSV into a summary table. Pick a row column, an optional column column, a value column and an aggregate β€” sum, count, average, min, max, median or distinct count β€” and the tool groups every row by those keys, aggregates the values, and shows row totals, column totals and a grand total. The result exports as CSV for a spreadsheet or as a Markdown table for docs and chat.

The parser is quote-aware per RFC 4180: a quoted field may contain commas, doubled quotes and line breaks, so a product called "Widget, Deluxe" stays one value instead of splitting into two columns. Non-numeric values are ignored by the numeric aggregates and counted by count and distinct, so messy real-world CSVs summarise instead of erroring.

The sample proves the engine with a hand-checkable answer: North Γ— Widget sums to 1,200 + 400 = 1,600, and the grand total of Sales is 11,700.

⚑

Key Features & Capabilities

βœ“

Real GROUP BY Engine

Group by one or two columns with seven aggregates and full totals.

βœ“

Quote-Aware RFC 4180 Parsing

Quoted commas, doubled quotes and line breaks inside fields survive.

βœ“

Row, Column and Grand Totals

Every pivot shows all three totals, not just the cells.

βœ“

CSV and Markdown Export

Download the pivot as CSV or copy it as a Markdown table.

βœ“

Honest Non-Numeric Handling

Non-numeric values are ignored by numeric aggregates and counted by count/distinct.

Pro Tips

  • β€’Bookmark this tool for instant one-click access anytime.
  • β€’Drag and drop files directly onto the input surface for fastest handling.
  • β€’All processing happens in your browser session for maximum speed and data safety.

🎯 Common Use Cases

Summarising Sales DataTotal sales by region and product without opening a spreadsheet.
Counting Survey AnswersCount responses by category, or count distinct values in a column.
Checking a DatasetSee min, max and median of a numeric column grouped by any category.
Monthly Spend by CategoryGroup a bank export by month and category with a sum of Amount to see where the money went.
πŸ“

CSV Pivot Table - Aggregation

Formula Equation:
Cell = aggregate of the value column over all rows sharing the row and column keys; average = sum Γ· count of numeric values; median = middle value of the sorted numeric values

Each cell groups the rows that share its row key and column key, then applies the chosen aggregate to the value column. Sum adds the numeric values; count counts non-empty values; distinct counts unique non-empty values; min and max take the extremes; average divides the sum by the count of numeric values; median takes the middle sorted value.

✏️

Worked Example

  1. 1Sample: North Γ— Widget, sum of Sales
  2. 2Rows: North, Widget, 1200 and North, Widget, 400
  3. 3Sum = 1,200 + 400 = 1,600; grand total of Sales across all 10 rows = 11,700
πŸ“š

Sources & Further Reading

Frequently Asked Questions about CSV Pivot Table

Frequently asked questions

Pick a row column, an optional column column, a value column and an aggregate (sum, count, average, min, max, median or distinct count). The tool groups every row by those keys and aggregates the values, with row totals, column totals and a grand total.

They are handled correctly: the parser is quote-aware per RFC 4180, so a field like "Widget, Deluxe" stays one value. The sample’s North Γ— Widget sum is 1,200 + 400 = 1,600 and the grand total of Sales is 11,700.

Sum, average, min, max and median ignore non-numeric values; count counts non-empty values and distinct counts unique non-empty values. A group with no numeric values shows 0 for numeric aggregates.

Yes β€” as CSV (for a spreadsheet) or as a Markdown table (for docs and chat). Both include the totals row and column.

7.5 β€” the ten Units values sort to 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, and the median of an even count is the mean of the two middle values, (7 + 8) / 2.

Yes β€” set β€˜Group by (columns)’ to β€˜(none β€” single column)’. You get one value column plus the Total column instead of a cross-tab.

Complementary utilities for your workflow

View all β†’
You are here

CSV Pivot Table

GROUP BY a CSV into a pivot table with totals.

Current tool

CSV to JSON

Convert CSV data sheets to JSON arrays.

Try tool

CSV Cleaner

Deduplicate, trim and fix messy CSV files.

Try tool

Merge CSV

Combine multiple CSV files into one, columns aligned.

Try tool

TIFF to JPG

TIFF scans and photos to JPG, decoded in-browser.

Try tool

TIFF to PDF

Every TIFF page to a PDF page, A4/Letter or original.

Try tool

PSD to JPG

Photoshop PSD to JPG/PNG, flattened in-browser.

Try tool