Version 6.6.1 Released!

Click to checkout the new features

Blog

Best JavaScript Pivot Table Libraries (2026), Free and Paid

Published November 4, 2026

The spec says "give finance a pivot table": sales by region across quarters, tickets by team and status, hours by person and project. Users want to summarise rows into a grid of totals, and some want to drag fields around to change the view. The JavaScript options split into dedicated pivot components (some free, many paid) and general data grids with a pivot feature (often behind an enterprise licence).

This guide compares six ways to get a pivot table into a web app in 2026, with a screenshot, licence and trade-offs for each. It also shows how to build a fixed layout pivot for free with Tabulator, which covers a lot of real specs. For a wider comparison of grids, see the best JavaScript table libraries.

The short answer

  • Users must drag and drop fields to build their own pivots, and you want it free? PivotTable.js (MIT, needs jQuery) or WebDataRocks (free to download, with wrappers for React, Angular and Vue).
  • The pivot layout is fixed by the spec (rows, columns and a measure you choose in code)? Build it with Tabulator. It is MIT licensed, and you also get sorting, filtering, editing, export and virtual rendering on the result.
  • Already on AG Grid Enterprise? Pivoting is included in that edition.
  • Want a supported commercial component? Syncfusion or Webix, both paid for production.

What to look for in a pivot table library

  1. Who controls the layout. Either developers fix the rows, columns and measures in code, or end users rearrange fields at runtime. The second needs a field list and drag and drop UI, which is the main thing dedicated pivot components add.
  2. Aggregations. Sum, count and average are the baseline. Check for min, max, distinct count, custom functions, and totals and subtotals for rows and columns.
  3. Data volume. Pivoting in the browser means aggregating every row on the client. Check what the library says about row limits, and whether it can aggregate on a server.
  4. Charts and export. Many pivot requests are really "a pivot table plus a chart, exported to Excel".
  5. Framework support. React, Angular and Vue wrappers, or plain JavaScript.
  6. Licence. Several pivot components are commercial, and some free ones come with restrictions you should read before shipping.

Comparison table

Details were checked against each project's website or documentation. Editions and prices change, so confirm on each project's site before you commit.

LibraryLicenceEnd user drag and dropDependencies
TabulatorMITNo (layout set in code)None
PivotTable.jsMITYesjQuery, jQuery UI
WebDataRocksFree to use, see its licence agreementYesNone, wrappers for React, Angular, Vue
AG GridMIT (Community), commercial (Enterprise)Yes (side bar, pivot panel)None
Syncfusion Pivot TableCommercial, free community licence for small teamsYesSyncfusion packages
Webix PivotCommercial (Pro package)YesWebix

Tabulator: a free pivot built on a full data grid

Tabulator is an open source JavaScript data grid under the MIT licence, with no dependencies and no paid edition. To be direct about it: Tabulator does not ship a pivot component or a drag and drop field list. What it does well is show the result of a pivot, because a pivot is just a table whose columns are generated from the data. Aggregate the rows into a matrix, generate the columns, and hand both to Tabulator. You then get everything else for free: sortable headers, header filters, column totals with column calculations, frozen columns, cell formatting, export to Excel, CSV and PDF and virtual rendering.

Pivot table of revenue by region and quarter built with Tabulator, with totals row and column
A region by quarter pivot built with Tabulator, with a total column and a totals row.

Here is the whole thing. The pivot() function turns flat rows into a row per rowField and a column per distinct colField value:

function pivot(rows, { rowField, colField, valueField, agg = "sum" }) {
  const cols = [...new Set(rows.map(r => r[colField]))].sort();
  const byRow = new Map();

  for (const r of rows) {
    const key = r[rowField];
    if (!byRow.has(key)) byRow.set(key, { [rowField]: key });
    const out = byRow.get(key);
    const c = r[colField];
    out[c] = (out[c] || 0) + (agg === "count" ? 1 : r[valueField]);
  }

  const data = [...byRow.values()].map(row => {
    row.total = cols.reduce((sum, c) => sum + (row[c] || 0), 0);
    return row;
  });

  const money = {
    formatter: "money", formatterParams: { precision: 0, symbol: "$" },
    hozAlign: "right", sorter: "number",
    bottomCalc: "sum", bottomCalcFormatter: "money",
    bottomCalcFormatterParams: { precision: 0, symbol: "$" },
  };

  const columns = [
    { title: rowField, field: rowField, frozen: true, headerFilter: "input" },
    ...cols.map(c => ({ title: c, field: c, ...money })),
    { title: "Total", field: "total", ...money },
  ];
  return { columns, data };
}

Then feed the result to a table:

const { columns, data } = pivot(sales, {
  rowField: "region",
  colField: "quarter",
  valueField: "revenue",
});

const table = new Tabulator("#pivot", { data, columns, layout: "fitColumns" });

Change rowField and colField and you get a different pivot. To let users pick the dimensions without a drag and drop UI, add two <select> elements, and when either changes, call pivot() again and run table.destroy() followed by a new Tabulator, or use table.setColumns(columns) and table.setData(data). That covers the common spec of "let people choose the row and column grouping".

Two related features are worth knowing before you build anything custom:

  • Row grouping with aggregates. If the spec is really "group by region, with subtotals", you may not need a pivot at all. Tabulator's row grouping with groupBy and column calculations produce grouped rows with sums, averages and counts per group. Our tree grid guide covers the related nested data option.
  • Server side aggregation. For large datasets, aggregate in SQL (GROUP BY) and load the already pivoted rows. Tabulator's remote data options work with any API.

Best for: teams handed a pivot style report with a fixed or developer controlled layout, who also need sorting, filtering, editing and export, and want to ship without a licence conversation.

Trade-off: no built in drag and drop field list, no automatic subtotals across multiple row levels, and you maintain the pivot function. If end users must build arbitrary pivots themselves, use one of the dedicated components below.

PivotTable.js

PivotTable.js is the best known open source pivot table in JavaScript. It is MIT licensed, and its pivotUI() function renders a drag and drop interface where users move attributes between rows, columns and a values area, and choose an aggregator and renderer. The core is tiny (its README says about 6.3 kB minified and gzipped) and there are heatmap and bar chart renderers, with optional chart plugins for D3, C3 and Google Charts.

PivotTable.js examples page with drag and drop pivot demos
The PivotTable.js examples page.

The catch is age and dependencies. It requires jQuery in every case, jQuery UI for the drag and drop interface, and its README says it was tested with jQuery 1.8.3 and jQuery UI 1.9.2. It also says it works acceptably up to roughly a hundred thousand records. React users can look at react-pivottable, a port maintained by Plotly. If you are moving away from jQuery, see our DataTables alternatives guide for jQuery free options.

Best for: internal tools and prototypes where users need free, drag and drop pivoting and jQuery is already on the page.

WebDataRocks

WebDataRocks is a pivot grid component that markets itself as completely free. Its page lists filtering, sorting and grouping, conditional and number formatting, calculated values, totals, export to PDF, Excel and HTML, and integration with Highcharts, Google Charts, FusionCharts and amCharts. It has ready made wrappers for Angular, React and Vue.

WebDataRocks JS Pivot Grid demo with toolbar and category by country report
The WebDataRocks pivot grid demo.

Read the licence agreement it links to before you ship a commercial product, because the product page does not spell out the terms. Flexmonster, the company named in its copyright notice, also sells a paid pivot component for heavier needs.

Best for: a polished, free pivot UI with framework wrappers, once you have checked the licence fits your use.

AG Grid

AG Grid supports pivoting inside its data grid. You set pivotMode: true, mark the pivot column with pivot: true, group rows with rowGroup: true and aggregate with aggFunc. Users can also configure pivoting through the side bar or pivot panel. Its documentation notes that at least one aggregation column is required, and that pivoting works with row grouping rather than tree data.

AG Grid Pivoting documentation page marked as an Enterprise feature
The AG Grid Pivoting documentation, marked Enterprise.

Pivoting is an Enterprise feature, imported from ag-grid-enterprise, which needs a paid licence for production use. If that is the sticking point, read AG Grid alternatives and the Tabulator vs AG Grid comparison.

Best for: teams with budget who want pivoting as part of one grid alongside row grouping, aggregation and the other Enterprise features.

Syncfusion JavaScript Pivot Table

Syncfusion sells a dedicated Pivot Table. Its page lists grid and chart views, drill down and drill up, Excel style filtering, virtual scrolling and paging, runtime editing, conditional formatting and calculated fields. It reads JSON, CSV, OData and REST sources, SQL and NoSQL databases and OLAP cubes, and exports to Excel, PDF and CSV, including a native Excel PivotTable.

Syncfusion JavaScript Pivot Table product page
The Syncfusion JavaScript Pivot Table page.

It is a commercial product that requires a paid licence. Syncfusion offers a free community licence, but only to organisations under $1 million USD in annual gross revenue with 5 or fewer developers and 10 or fewer employees, so check eligibility before you plan on it. See Syncfusion pricing and alternatives for what a paid licence costs.

Best for: teams that need OLAP or database connectivity and a very complete commercial pivot, and are already in the Syncfusion ecosystem.

Webix Pivot

Webix Pivot offers data aggregation in table, tree and chart views, custom operations, localisation, min and max highlighting, built in pivot charts (bar, line, radar, donut, pie and more) and export to PNG, PDF, Excel and CSV.

Webix JavaScript Pivot Table and Pivot Charts product page
The Webix Pivot product page.

Its FAQ states that Pivot is available only as part of the commercial Pro package and is not in the free Community edition. There is a 30 day free trial. Pivot is included in the Company, DevTeam and Unlim packs, or added to a Custom pack: see our Webix pricing guide.

Best for: teams already building on the Webix widget library.

Which pivot table library should you pick?

  • Fixed layout report, plus editing, filtering and export, with no licence budget: Tabulator and a small pivot() function.
  • End users build their own pivots, free: PivotTable.js or WebDataRocks.
  • You already pay for AG Grid Enterprise: its pivot mode.
  • OLAP, databases and vendor support: Syncfusion or Webix.

Be honest about whether the spec needs real pivoting. "Show totals by region and quarter" is a fixed pivot, and "let analysts explore the data any way they like" is a BI tool. Many teams buy the second kind of component to deliver the first.

Frequently asked questions

What is the best free JavaScript pivot table library?

PivotTable.js is MIT licensed and has a drag and drop UI, but depends on jQuery. WebDataRocks is free to download with React, Angular and Vue wrappers (check its licence). For a fixed layout pivot inside a full data grid, Tabulator is MIT licensed and needs a short aggregation function.

Does Tabulator have a pivot table?

Not as a built in component. Tabulator does not include a pivot field list or drag and drop UI. You aggregate the data into rows and generated columns (about 30 lines of JavaScript, shown above) and Tabulator renders it with sorting, filtering, column totals and export. For grouped rows with subtotals, use its built in row grouping.

Is there a React pivot table library?

react-pivottable ports PivotTable.js to React, and WebDataRocks provides a React wrapper. Tabulator works in React too, see the best React table libraries guide and the React table page.

Is AG Grid pivoting free?

No. AG Grid's documentation marks Pivoting as an Enterprise feature, which requires a paid licence for production use.

How many rows can a JavaScript pivot table handle?

Client side pivoting aggregates every row in the browser. PivotTable.js says it works acceptably up to roughly a hundred thousand records. Beyond that, aggregate on the server with GROUP BY and load the summarised rows.

Get started with Tabulator

Follow the install guide, read about column calculations and row grouping, and browse the examples. The source is on GitHub. For more comparisons, see the JavaScript grid library guide, the editable table guide and the framework guides for Angular, Vue and Svelte.