CSV Pivot Table

Count records or sum numeric values across exact CSV row and column groups.

CSV stays in this browser. Input is not uploaded.

Comma-separated CSV with 1-200 unique nonempty headers, up to 10,000 data rows and 200,000 characters. Every record must have the same cell count as the header.

Summarize CSV records by two fields

Paste comma-separated CSV with a header row. Enter the one-based Row / identifier column and Pivot column, then choose Create pivot. By default each row contributes one count. Enable Sum numeric values instead of counting to choose a numeric value column.

Example: counts and sums answer different questions

The example has two North/A records with amounts 2 and 3, and one South/B record with amount 4. Count mode gives North/A = 2 and South/B = 1. Sum mode with value column 3 gives 5 and 4. Combinations not present in the source receive zero. The result keeps row-group and column-group order by first appearance.

Grouping and numeric conventions

Groups match exact cell strings, including case and surrounding whitespace. Blank grouping values form an ordinary empty-string group. Row and pivot columns must differ. Sum mode requires every selected value to be a supported, nonblank decimal number; it does not silently ignore missing data. Scientific notation is allowed, but currency symbols, grouping commas and percentages are not.

Sums use JavaScript floating-point arithmetic and can round or lose small contributions. Overflow is rejected. Use exact financial or scientific software when arbitrary precision is required. This tool does not compute averages, subtotals, percentages or multiple value measures.

Output layout and bounds

The first heading begins with Row: and pivot headings begin with Value: to keep structural headers distinct. At most 500 row groups, 100 column groups and 20,000 result cells are allowed. Sparse groups still create a rectangular matrix, so many distinct keys can exceed the cell limit even with few source records. Use CSV Row Filter to narrow the source, or CSV Unpivot Tool to turn wide measures into long-form records first.

CSV input limits

Use at most 200,000 characters, 200 unique nonempty headers and 10,000 data records. Quoted commas, quotes and multiline cells follow the shared CSV parser. Output is capped at two million characters. Editing input or options clears old results and download links; no source file is modified.

Preserve cell strings exports generated cell strings without protection prefixes. Add spreadsheet-protection prefixes adds an apostrophe to formula-like cells, including negative numbers, changing their values. Review that choice for the receiving application. CSV downloads quote every field and use CRLF record separators.