Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. CSV & Data Analysis
  3. CSV Pivot Table Generator
Add to favorites

CSV Pivot Table Generator

Summarise a CSV as a pivot table: group rows by one or two columns and show the sum, count, average, median or another total for each group, with row and column totals.

Rows never leave your deviceMore csv & data analysisJump to full guide

Initializing in your browser…

You might also like

CSV Viewer & Editor

Open a CSV as a sortable, searchable table, edit cells, rows and columns with undo, and download the result. Runs in your browser.

CSV to SQL

Turn a CSV into CREATE TABLE, INSERT, UPDATE or UPSERT statements for PostgreSQL, MySQL, SQLite, SQL Server or Oracle, with types detected and every value escaped.

CSV to JSON Converter

Convert CSV to JSON or JSON back to CSV, keeping zip codes, IDs and quoted text exactly as written and listing anything the conversion changes.

A sample run

Sixteen orders from four sales regions over four quarters. You want revenue per region per quarter, and one order has no amount filled in.

orders.csv (excerpt)

Order,Region,Quarter,Product,Units,Amount
1001,North,Q1,Laptops,3,3600
1004,North,Q1,Accessories,12,384
1009,North,Q3,Monitors,2,540
1012,North,Q3,Accessories,15,
1014,North ,Q4,Laptops,5,6000
...  (16 orders in all)
What CSV Pivot Table Generator produces

Sum of Amount by Region and Quarter, group names ignoring spaces

Region      Q1      Q2      Q3      Q4     Total
North    3,984   4,800     540   6,000    15,324
South    2,400   1,638   3,600     800     8,438
West     1,080     640   1,200   4,020     6,940
Total    7,464   7,078   5,340  10,820    30,702

North's Q1 cell is 3,600 plus 384. Its Q3 cell is only 540, because order 1012 has an empty amount and an empty cell is left out rather than counted as zero. Order 1014 was typed as "North " with a trailing space; with exact matching it appears as a separate row holding 6,000, and the page suggests Ignore spaces, which folds it into North's Q4 and gives North a total of 15,324. The grand total of 30,702 is the same either way, because no order is lost, only regrouped.

Pivot Tables From a CSV, Without a Spreadsheet

Choose a column for the rows, an optional column for the columns, a value to summarise and how to summarise it, and the pivot table appears straight away with totals on both edges. It works like a spreadsheet pivot table, but in your browser and without importing anything, and it tells you which values it left out and why.

How to use

  1. 1Drop a CSV file on the page, choose one, paste rows, or press Try a sample to see sales by region and quarter.
  2. 2Choose the column whose values become the rows of the table.
  3. 3Optionally choose a second column to spread across the top, or leave Columns at None.
  4. 4Choose the column to summarise and how: Sum, Count, Average and so on.
  5. 5Open More options to merge group names that differ only in spaces or case, set decimal places, or turn totals off.
  6. 6Press Download CSV, or Copy and paste the table into a spreadsheet.

Key features

  • Rows, optional columns, a value column and thirteen summary functions
  • Updates instantly as you change any setting
  • Row totals, column totals and a grand total computed from the underlying values
  • Sum, average, median, minimum, maximum, count, count rows, count distinct, first, last, concatenate and two standard deviations
  • Non-numeric values left out of numeric summaries and reported with examples
  • Optional reading of numbers written with thousands separators
  • Exact, space-insensitive or case-insensitive matching of group names, with near-duplicates pointed out
  • Empty group values kept as their own group
  • Download as CSV with plain numbers, or copy as tab-separated text for pasting into a spreadsheet
  • Runs in your browser, with nothing uploaded

How it works

How it works. A pivot table answers questions like "how much did each region sell in each quarter?" Pick Region for Rows, Quarter for Columns, Amount for Values and Sum for Summarise by, and you get one row per region, one column per quarter, each cell holding the total for that combination, plus a Total row and column. Leave Columns at None for a simple list of groups with one figure each. The table rebuilds the moment you change a setting, so you can try Count, Average or Maximum on the same data in a few clicks.

Thirteen ways to summarise. Sum, Average, Median, Minimum and Maximum work on numbers. Count counts cells that hold something, Count rows counts every row in the group including empty cells, and Count distinct counts different values, which answers questions such as how many customers bought each product. First and Last return the first or last value in file order, Concatenate joins the values with a separator you choose, and there are both population and sample standard deviations. Totals are worked out from the underlying values, so the total of an Average column is the average of all the values in that row, not the average of the averages.

Numbers and gaps. Values are read as numbers when they are numbers; cells such as N/A or pending are left out of a sum or average rather than counted as zero, and the page says how many were skipped with examples. If your amounts are written with thousands separators, like 1,234.50, switch on the matching option under More options so they are read correctly. Empty cells in the grouping columns form their own group, shown in italics, so no row disappears.

Group names. By default names are matched exactly, which keeps genuinely different values apart. Real exports often contain slips such as "North" and "North " with a trailing space, or "north" in lower case. When that happens the page points it out, and Match group names under More options can ignore spaces, or spaces and case, and list which spellings were combined.

Taking it further. Download the pivot as a CSV with plain numbers (no thousands separators, so any spreadsheet reads them as numbers) and a UTF-8 byte order mark, or copy it and paste it straight into Excel or Google Sheets, where it lands in separate cells. Your data is processed in the browser and never uploaded.

Where this fits a data pipeline

  • Sales by region and period

    Total revenue per region per quarter or month from an order export, with totals for each region and each period.

  • Counting responses

    Count survey answers by question and option, or support tickets by team and priority, using Count or Count rows.

  • Averages per group

    Average order value per customer segment, or average delivery time per courier, with Average or Median.

  • Checking a spreadsheet's pivot

    Rebuild a pivot from the raw export to confirm the figures in a report, including how many values were skipped.

Tips & best practices

  • Start with Count rows to see how many records fall into each group before looking at sums or averages.
  • If a group is unexpectedly small, look for a near-duplicate name such as a trailing space or different capitalisation.
  • Use Median instead of Average when a few very large values would distort the picture.
  • Concatenate is handy for listing, for example, every product a customer bought in one cell.

Examples

  • Units by product

    With Product as Rows, Columns set to None, Units as Values and Average, the sample gives Accessories 16.2, Laptops about 2.86 and Monitors 4.25 units per order.

  • Customers per product

    Count distinct on a Customer column, with Product as Rows, shows how many different customers bought each product rather than how many orders there were.

  • A blank amount

    In the sample, order 1012 has no amount, so North's Q3 total is 540 from one order, and the empty cell is not counted as zero.

Frequently asked questions

Why do I see the same group twice?

Because the two names are not exactly the same, usually a trailing space or a difference in capital letters. The page points out such pairs. Under More options, set Match group names to Ignore spaces, or Ignore spaces and case, to merge them; the page then lists which spellings were combined.

What is the difference between Count and Count rows?

Count counts cells in the value column that hold something, so empty cells are not counted. Count rows counts every row in the group, whether or not the value cell is empty.

Why is my total not the sum of the averages?

Totals are computed from all the underlying values. For Average, the total of a row is the average of every value in that row, which differs from averaging the cell averages when groups have different sizes. For Sum and the counts, the two agree.

Some values were left out. Why?

Numeric summaries only use cells that are numbers. Text such as N/A or pending is skipped, and the page lists how many cells were skipped with examples. If your numbers contain thousands separators, turn on the option for them under More options.

Can I use it without a Columns field?

Yes. Set Columns to None and you get a simple grouped summary: one row per group with a single figure, like GROUP BY in SQL.

How do I get the table into Excel or Google Sheets?

Press Copy and paste into a sheet, and each value lands in its own cell. Or press Download CSV; numbers are written without thousands separators so they are read as numbers in any language setting.

Is my data private?

Yes. The file is read and summarised in your browser and is never uploaded.

Related tools and how they differ

  • CSV Statistics Generator: Use it to describe each column as a whole (mean, spread, outliers) rather than comparing groups.
  • CSV Row Filter: Use it first to keep only the rows you want to summarise, such as one year or one product line.
  • CSV to Excel Converter: Use it when you would rather build the pivot in Excel itself from a proper workbook.

Private by design

Rows and columns are parsed and transformed in memory in your browser. No record ever reaches a server.