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

Group and aggregate with the choices stated: what count counts, how group keys are matched, and which values were not numbers

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

Initializing in your browser…

You might also like

CSV Viewer & Editor

View, sort and edit a CSV, with an undo stack that goes back exactly one step and a parse report that tells a broken quote from a ragged row

CSV to SQL

Generate SQL that runs: identifiers quoted rather than stripped, values escaped per dialect, and every change to your data reported

CSV to JSON Converter

Convert both ways, converting a type only when it reads back the same, and naming every value that cannot

A sample run

Sales by region and quarter, from a file that has one unreadable amount and one row with no region.

Input

region, quarter, amount  (7 rows; one amount is "n/a", one region is blank)
What CSV Pivot Table Generator produces

Sum

              Q1     Q2   Total
North        150    150     300
South        200    250     450
(empty)       40             40
Total        390    400     790
1 value could not be read as a number: "n/a"

South Q1 sums to 200 rather than partly counting the "n/a", and the tool says so above the table instead of leaving it silent. The blank region is its own group and stays distinct from a row whose region is literally the text (empty). Switch to Average and the South total is 225, the mean of 200 and 250, because totals are aggregated over the underlying values rather than over the cells above them.

Pivot Tables Where Every Choice Is Stated

Pick a row field, a column field, a value field and an aggregation, and get a cross-tabulation with row, column and grand totals. The arithmetic in a pivot table is easy to get right; what is easy to get wrong is everything around it, so this one says what Count counts, how two group keys are decided to be the same, and which values it could not read as numbers.

How to use

  1. 1Upload your CSV file, or load the sample
  2. 2Choose the row field, the column field and the value field
  3. 3Choose the aggregation; each one says exactly what it computes
  4. 4Set how group keys should be matched, and whether your values use grouped thousands
  5. 5Generate, read the note about anything that was skipped or merged, then download

Key features

  • Thirteen aggregations: sum, count, count rows, count distinct, average, median, minimum, maximum, first, last, concatenate, and both standard deviations
  • Count and Count rows offered separately, so "how many" is never ambiguous
  • Both standard deviations kept apart, each labelled with its divisor, with the sample form undefined at one value rather than zero
  • Values read through a stated decimal grammar, so nothing is partly counted the way parseFloat partly counts 12abc
  • A report of how many values could not be read as numbers, with examples
  • Group key matching as a setting: exactly as written, ignoring spaces, or ignoring spaces and case, with every merge listed
  • An empty group key kept distinct from a value that is literally the text (empty)
  • Numeric group keys sorted numerically, so 10 does not come between 1 and 2
  • Compensated summation, so a long column does not drift
  • Row, column and grand totals aggregated over the underlying values rather than over the cells
  • A summary of how the table was computed, shown with the results
  • Handles a group of 150,000 rows in about 300 milliseconds
  • Download the pivot table as CSV

How it works

Measured against the same aggregation written from its definition in Python, the previous version of this tool got every cell and every total right for sum, count, average, median, minimum and maximum on a clean file. Every fault was a decision nobody had made out loud, and each of them changes a number a reader will act on.

Values were read with parseFloat, which reads a PREFIX and stops. parseFloat("12abc") is 12, and parseFloat("1,234") is 1 because it stops at the comma. A group holding 12abc, 1,234 and 100 therefore summed to 113, where only one of the three is a number and the correct sum is 100. Nothing on screen said a value had been partly read. Values now go through a stated decimal grammar, nothing is partly counted, and the table reports how many values it could not read and shows examples.

Count counted empty cells. A group holding 100, a blank and 200 counted 3, and a group whose only cell was blank counted 1. "How many" has two answers, rows and values, and both are now offered under separate names, each saying which it means.

An empty group key became the literal text "(empty)", which is a string a value can also hold, so a row whose key really was (empty) merged into the same group. The empty group is now tracked as a flag rather than as a placeholder, so the two stay apart, and it sorts last.

Group keys sorted lexicographically, so numeric keys came out 1, 10, 2. They now sort numerically when they are numbers and as text when they are not. And whether North, north and "North " are one group or three is now a setting with three options, shown with the results, and any keys that were merged are listed with all their spellings. Under exact matching a key with surrounding whitespace is shown quoted, because otherwise the table has two rows that look identical and are not.

Sums used plain left-to-right addition, which lost all one hundred of a hundred 1s added after a 1e16; they now use compensated summation. And min and max spread the array into an argument list, which threw RangeError: Maximum call stack size exceeded and rendered nothing at all on a 150,000 row group. That group now completes in about 300 milliseconds.

One thing the previous version already did right is preserved and now tested: a row total is the aggregation of the underlying VALUES, not of the cells in that row. The difference is invisible for a sum and decisive for an average, where the mean of a row of means is not the mean of the row unless every cell holds the same number of values.

Where this fits a data pipeline

  • Sales by region and quarter

    The classic cross-tabulation, with the totals computed from the underlying rows so an average row total is the average of the data rather than the average of the averages.

  • Finding out how much of a column is unusable

    The skipped-values report says how many entries in the value column are not numbers and shows examples, which is often the more useful output.

  • Auditing messy category names

    Switch key matching between exact and case-insensitive and see which spellings merge, so you find out whether North, north and "North " are one thing or three.

  • Counting rows against counting values

    Use Count rows for how many records fell into a group and Count for how many of them held anything, and see the difference where the blanks are.

Frequently asked questions

Does Count include empty cells?

No. Count is how many cells hold something. Count rows is how many rows fell into the group, blanks included. Both are offered because both are legitimate questions, and each says which it answers.

Why is a value in my column being ignored?

Because it is not a number, and the alternative is worse: parseFloat reads a prefix, so 12abc would count as 12 and 1,234 would count as 1. Anything skipped is counted and shown above the table with examples. If your values use grouped thousands, turn on that option and they will be read.

Are North, north and "North " one group or three?

Whichever you choose. The default is exactly as written, which gives three, and a key with surrounding whitespace is shown quoted so you can tell them apart. Switch to ignoring spaces, or spaces and case, and the merged spellings are listed under the table.

How are the totals computed?

From the underlying values, not from the cells. For a sum that makes no difference. For an average it does: the average of a row of averages is not the average of the row unless every cell holds the same number of values.

Which standard deviation does it use?

Whichever you pick. Both are offered: the population form divides by n and describes the group, and the sample form divides by n-1 and estimates the population the group came from. The sample form is reported as undefined for a group with one value, because n-1 is zero.

How big a file can it pivot?

Everything runs in your browser. A single group of 150,000 rows completes in about 300 milliseconds; the version this replaced crashed on that input.

Private by design

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