Pivot Table Maker
Paste CSV and pivot it in seconds — choose row, column and value fields, aggregate by sum, count or average, with row and column totals.
A pivot table re-slices a flat list by two of its dimensions at once, and the totals are the built-in audit: every row total, column total and the grand total must agree, or something is wrong. The sample data shows the whole mechanism in four rows — North/Apples 10, North/Oranges 5, South/Apples 7, North/Apples 2 — pivoted by Region (rows) and Product (columns) with Sum on Sales: North/Apples combines two rows into 12, the row totals are North 17 and South 7, the column totals are Apples 19 and Oranges 5, and both routes arrive at the same grand total of 24. Switch the same table to Count and the grand total becomes 4 (rows, not sales); switch to Average and North/Apples becomes 6, the mean of 10 and 2, with the grand average of 6 weighted by row counts rather than averaged from cell averages.
Everything runs in your browser; your file is never uploaded, your data stays on your device, is never uploaded, never stored and never put into a link. Quoted fields and commas inside quotes are handled by the built-in CSV parser.
Quick answers
How do I pivot CSV data online?
Paste CSV with headers, pick row, column and value fields, and choose Sum, Count or Average. Four sample rows (North/Apples 10 and 2, North/Oranges 5, South/Apples 7) pivot to a grand total of 24 by Sum and 4 by Count.
Row totals, column totals and the grand total are all computed from the same rows, so they cross-check each other.
How is a pivot table average calculated?
Per cell, as the sum of the value field divided by the number of rows in that cell — North/Apples with values 10 and 2 averages 6. Totals use the underlying rows, so the grand average is the mean of every row, weighted correctly.
Averaging the visible cell averages instead would weight a one-row cell the same as a hundred-row cell; this tool never does that.
How to use
- Paste CSV with a header row (or open a .csv file from your device) — the field dropdowns fill from your headers.
- Choose the row field (what each row groups by), the column field, and the value field to aggregate.
- Pick the aggregation: Sum for totals, Count for how many rows fall in each cell, or Average for the mean value per cell.
- Read the table with its row totals, column totals and grand total, then copy it as CSV or download the .csv.
About this tool
Practical notes that save real debugging time: the value field is read as a number for Sum and Average (non-numeric entries count as 0 for Sum and still count as rows for Count and Average denominators follow the rows present in each cell), empty combinations show 0 for Sum and Count and a dash for Average, since a mean of nothing does not exist; and grouping is by the exact text in the field, so “North” and “north ” are two different rows — clean stray spaces in your source if a group splits unexpectedly. The CSV parser built into the page handles quoted fields, commas inside quotes and doubled quote escapes, so exports from spreadsheets paste in cleanly.
Frequently asked questions
How does the pivot aggregation work?
Each data row lands in exactly one cell: the intersection of its row-field value and its column-field value. Sum adds the value field in the cell, Count counts the rows, Average divides the cell’s sum by its row count. Totals aggregate the underlying rows, so an Average grand total is the mean of all rows, not the mean of the cell means.
Can I open a spreadsheet file directly?
You can open a .csv file from your device on this page, and it is read locally. For .xlsx files, use the Excel to JSON Converter first, or save the sheet as CSV in your spreadsheet app and paste or open it here.
Why did one group split into two rows?
Grouping uses the exact field text, including case and trailing spaces. “North” and “North ” (with a space, a common spreadsheet export artefact) are different groups. Trim the source column and rebuild — the totals will merge.
What do empty cells mean?
No source rows had that row/column combination. They show 0 under Sum and Count (there is genuinely nothing to add or count) and a dash under Average, because the mean of zero rows is undefined rather than zero.
First time embedding? Read the step-by-step guide →
More free tools
Excel to JSON Converter
Convert .xlsx, .xls or .csv sheets to JSON locally — pick a sheet, toggle the header row, copy or download the JSON.
CSV to JSON Converter
Convert CSV to a JSON array — proper quoted-field parsing, delimiter and header options, files processed locally, never uploaded.
JSON to CSV Converter
Turn a JSON array into CSV instantly.
Bar Chart Generator
Turn label, value lines into a clean bar chart — live SVG preview with SVG and PNG downloads, drawn entirely in your browser.
Base64 Encode / Decode
Encode text to Base64 or decode it back.
Color Converter (HEX ↔ RGB)
Convert HEX to RGB and back, with live preview.