Comparison: SvGrid vs AG Grid vs TanStack Table
The three projects solve overlapping problems, and the right choice
depends on the framework you ship on, how much of the grid you want to
build yourself, and your budget. Every number on this page is read from
npm or measured by a script in this repository on the date shown; the
block below is regenerated by node tools/sync-guide-facts.mjs and the
per-competitor pages under /compare/ list
the sources for every feature claim.
Facts, checked 12 Sep 2026.
ag-grid-community36.1.0, MIT, last published 5 Aug 2026, 12,400,000 npm downloads in the 30 days to 10 Sep 2026.@tanstack/svelte-table9.2.4, MIT, last published 28 Aug 2026, 231,000 npm downloads in the same window.@svgrid/grid3.0.3, MIT, last published 11 Sep 2026, 16,900 npm downloads in the same window. Bundle, minified and gzipped, each package built alone with Svelte external: SvGrid 3.0.3 84.5 KB JS + 9.5 KB CSS (measured 12 Sep 2026);ag-grid-community36.1.0 317.5 KB JS, no separate stylesheet (measured 12 Sep 2026);@tanstack/svelte-table9.2.4 36.3 KB JS, no separate stylesheet, svelte external (measured 12 Sep 2026). AG Grid pricing, as its site states it: AG Grid Community is free under MIT. AG Grid Enterprise is listed at $999 USD per developer with one year of updates and Zendesk support; the Enterprise Bundle with AG Charts Enterprise is $1,498 USD per developer (https://www.ag-grid.com/license-pricing/, read 12 Sep 2026). TanStack Table pricing, as its site states it: TanStack Table is MIT and free; tanstack.com is sponsor-supported and offers Enterprise Support as private consulting and expert support, with no licence sold for the table (https://tanstack.com/table/latest, read 12 Sep 2026). SvGrid: MIT core; @svgrid/enterprise from $599 per developer per year. Side by side, with sources: SvGrid vs AG Grid (community + enterprise), SvGrid vs TanStack Table (Svelte).
TL;DR
| Project | Lives in | Ships | Licence |
|---|---|---|---|
| SvGrid | Svelte 5 | Headless core + Svelte render component + Enterprise pack | MIT (Community) / commercial (Enterprise) |
| AG Grid Community | React, Angular, Vue, plain JS | Full grid + renderer; Svelte through community integrations | MIT |
| AG Grid Enterprise | same | Adds the set filter, range selection, master/detail, tree, grouping, pivot, charts, Excel export, server-side row model | Commercial, per developer |
| TanStack Table | React, Vue, Svelte, Solid, Qwik, Lit, JS | Headless engine only; the Svelte adapter is Svelte 5 | MIT |
The bundle sizes and prices are in the facts block above, with the date they were read and the method behind the sizes.
When SvGrid is the right choice
- You're on Svelte 5 and want a grid that uses the runtime's idioms
(snippets for cells,
$statefor data,$derivedfor aggregates) - not a React-port pretending to be Svelte. - You want a headless core you can render yourself AND a default-styled component for the 80% case. Most "headless" libraries make you write the markup; most "monolith" libraries make you fight the markup. SvGrid does both in one package.
- You need clean theming via CSS custom properties and a documented
--sg-*token surface, not a hard-coded class soup. - You ship under strict CSP (no
eval, nonew Function, no inline scripts). SvGrid runs clean; AG Grid Community does too. TanStack Table is engine-only so the question doesn't apply. - You want SSR markup that is meaningful before hydration (good
first paint, SEO, SvelteKit
+page.serverintegration). SvGrid + TanStack Table both qualify. AG Grid renders client-side. - You want the features AG Grid sells as Enterprise - the set filter, range selection, master/detail, tree data, grouping with aggregation, the server-side row model, integrated charts - in the MIT core.
When AG Grid is the right choice
- You're on React, Angular, or Vue, not Svelte. SvGrid is Svelte-only, and ag-grid.com points Svelte users to community-built integrations rather than an official package.
- You need server-side pivoting, or a push-based viewport row model for a real-time trading blotter. SvGrid ships pivot, charts and a server-side row model (sort / filter / group / infinite), but not those two.
- You need pluggable custom filter components or custom tool panels. SvGrid's tool panel is a fixed Columns + Filters pair.
- You need AG Charts for maps, network graphs, 3D or a canvas renderer. SvGrid's chart is SVG with decimation, and it ships 29 types, a configurable axis model, synchronized charts, a financial toolkit with indicator panes and drawing tools, a builder and PDF export in the MIT core; it does not draw maps.
- You want a vendor with a decade of enterprise procurement paperwork already on file.
When TanStack Table is the right choice
- You want a rendering-framework-agnostic engine so the same business logic powers React + Svelte + Solid surfaces in your monorepo.
- You're already in the TanStack ecosystem (Query, Router, Form, Virtual) and want one mental model.
- You're happy writing all the markup yourself - the row recycling, the keyboard map, the ARIA roles, the focus management, the drag-to-resize. That's the cost of "engine only".
Feature parity at a glance
Yes: shipped in that edition. Partial: needs extra work or a companion package. No: not available. The AG Grid columns follow ag-grid.com's Community vs Enterprise page and its Set Filter, Tree Data and CSV export pages; the dated list of those sources is on the SvGrid vs AG Grid page, and the TanStack sources on SvGrid vs TanStack Table.
| SvGrid Community | SvGrid Enterprise | AG Grid Community | AG Grid Enterprise | TanStack Table | |
|---|---|---|---|---|---|
| Headless core (engine only) | Yes | Yes | No | No | Yes |
| Default render component | Yes (Svelte 5) | Yes | Yes (each framework) | Yes | No |
| Sort (multi-column) | Yes | Yes | Yes | Yes | Yes (engine) |
| Filter menu (operator + facet) | Yes | Yes | Partial (text and number filters; the set filter is Enterprise) | Yes | No |
| Filter row | Yes | Yes | Yes | Yes | No |
| Pagination | Yes | Yes | Yes | Yes | Yes (engine) |
| Grouping + aggregation | Yes | Yes | No (Enterprise) | Yes | Yes (engine) |
| Tree / expand-collapse rows | Yes | Yes | No (Enterprise) | Yes | Yes (engine) |
| Master/detail | Yes | Yes | No (Enterprise) | Yes | No |
| Cell range selection + copy/paste | Yes | Yes | No (Enterprise) | Yes | No |
| Fill handle | Yes | Yes | No (Enterprise) | Yes | No |
| Inline editing (typed editors) | Yes | Yes | Yes | Yes | No |
| Column virtualization | Yes | Yes | Yes | Yes | No |
| Row virtualization | Yes | Yes | Yes | Yes | Partial (pair with TanStack Virtual) |
| Column pinning (left/right) | Yes | Yes | Yes | Yes | No |
| Column tool panel | Yes | Yes | No (Enterprise) | Yes | No |
| Context menu | Yes | Yes | No (Enterprise) | Yes | No |
| Fit-to-width with shrink | Yes | Yes | Partial | Yes | No |
| WAI-ARIA grid pattern | Yes | Yes | Yes | Yes | No (your markup) |
| Server-side row model | Yes (built in) | Yes (built in) | No (Enterprise) | Yes (built in) | Partial (manual flags) |
| CSP-clean (no eval, no inline) | Yes | Yes | Yes | Yes | n/a |
| Meaningful SSR markup | Yes | Yes | No | No | depends on your markup |
| CSV / TSV / JSON export | Yes | Yes | Yes (CSV) | Yes | No |
| Excel (.xlsx) / PDF export | No | Yes | No | Yes (Excel) | No |
| No | Yes | No | No | No | |
| Excel / CSV import | No | Yes | No | No | No |
| In-grid AI helpers (bring your own model) | Yes | Yes | No | No | No |
| MCP server for AI assistants | Yes (@svgrid/mcp) |
Yes | Yes (ag-mcp) |
Yes | No (agent skills ship in the package) |
| Pivot table | No | Yes | No | Yes | No (custom) |
| Integrated charts | Yes (29 types, builder, financial toolkit) | Yes | No | Yes (AG Charts) | No |
| Support response time | GitHub (best-effort) | 1 business day; 1h sev-1 on Enterprise | GitHub (best-effort) | no number published | GitHub; paid Enterprise Support offered |
| Theming via CSS variables | Yes (--sg-*) |
Yes | Yes (theme builder) | Yes | n/a |
| Source button per demo | Yes (gallery) | Yes | No | No | No |
Bundle size
The facts block at the top of the page has the gzipped size of each
package, measured by the same method: each package built alone with Vite
in library mode, minified, gzip level 9, Svelte external because it is a
peer dependency. SvGrid's own number comes from pnpm size:json
(packages/grid/scripts/measure-size.mjs), the competitors' from
pnpm competitors:measure; both write docs/_data and the block is
regenerated from there, so the page cannot quote a size nobody measured.
What the SvGrid number contains: the whole render component -
virtualization, Excel-style filters, inline editing, grouping, tree,
master/detail, cell selection and accessibility - in one import, plus a
separate stylesheet. Charts, date and time editors, menus and export split
into import() chunks that load on demand rather than shipping in the
initial bundle; the headless core on its own is a small fraction of the
render component, and @svgrid/enterprise features are separate subpath
imports. The per-entry breakdown, including the headless core and the
lazy chunks, is in the bundle size reference.
What the AG Grid number contains: createGrid with every Community
module registered and the Quartz theme, whose CSS ships inside the script
under the theming API, so there is no separate stylesheet to add. The
TanStack number is the whole Svelte adapter with its engine: no
virtualizer, filter UI or editors, because a headless library has none.
Measured performance
A vendor's own benchmark is worth nothing unless you can rerun it, so the
harness is in the repository and takes an adapter per grid. Adding another
grid is about forty lines in examples/src/bench/adapters.ts and nothing
else.
# headless, prints the table and writes tests/perf/.last-compare.json
BENCH_REPEATS=7 BENCH_GRIDS=svgrid,aggrid,svar,tanstack pnpm bench:compare
# move that run into docs/_data/competitors.json, then regenerate this page
node tools/record-benchmarks.mjs && node tools/sync-guide-facts.mjs
# or drive it by hand
pnpm --filter @svgrid/grid-example-gallery dev # then open /bench.html
Each operation is timed until the grid's DOM reflects it, plus one frame:
- Mount - fresh container, create the grid, until rows are painted.
- Sort - change the sort on one column, until the new order is painted.
Text sorts
name(tens of thousands of distinct values), numeric sortsamount. - Filter - apply a
containsfilter to one column. - Scroll - 180 frames at 60 px/frame, sampling frame intervals.
Results
The table is generated from the ledger by tools/sync-guide-facts.mjs;
the versions and the date are part of it.
Measured 12 Sep 2026 with pnpm bench:compare (tests/perf/compare.spec.ts, recorded by tools/record-benchmarks.mjs): 100,000 rows x 9 columns; 1000 x 520 px container, 32 px rows, 140 px columns, each grid with its default theme; fastest of 7 samples per operation, each grid in a fresh page; Chromium through Playwright, headless; win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Lower is better.
| Operation | SvGrid | AG Grid Community | SVAR Svelte DataGrid | TanStack Table, minimal DOM |
|---|---|---|---|---|
| Mount | 75.5 ms | 51.4 ms | 11.4 ms | 196 ms |
| Sort, text column | 149 ms | 282.8 ms | 187.2 ms | 466 ms |
| Sort, numeric column | 115.7 ms | 270 ms | 165.1 ms | 374.6 ms |
| Filter, one column (indicative only, see below) | 99.6 ms | 170.4 ms | 32.6 ms | 111.7 ms |
| Scroll, p95 frame | 34.6 ms | 35.9 ms | 34.8 ms | 35.3 ms |
| Frames dropped while scrolling, of 180 | 0 | 0 | 0 | 1 |
| Rows kept in the DOM (virtualization on) | 27 | 35 | 19 | 27 |
Versions: @svgrid/grid 3.0.3, ag-grid-community 36.1.0, wx-svelte-grid 2.7.0, @tanstack/svelte-table 9.2.4.
Read that as: SvGrid sorts faster than AG Grid Community and SVAR on both column types, scrolling is level across all four, and mounting is where the lighter grids are ahead - SVAR paints its first rows fastest, AG Grid is ahead of SvGrid, and the TanStack renderer pays for building a row object per record before it can draw anything. Anyone claiming a single headline number for a grid comparison is selling something.
The filter row is not a like-for-like comparison and is shown only because
hiding a number we win looks worse than explaining it. The grids' single-
column filter APIs differ: the harness drives AG Grid's quick filter, which
searches every column and is strictly more work than the single-column
contains SvGrid performs, while SVAR and TanStack run a predicate over the
one column. Do not read a ratio into that row.
The TanStack column is an engine plus the least DOM an app could draw. TanStack Table renders nothing, so its adapter draws the row model through a fixed-height windowed table with no virtualizer library, no filter UI and no editors. Its mount and sort numbers include creating the engine's row objects for every record; the grids around it do the same work inside their own models.
Sorting is where SvGrid's distance comes from, and it is not subtle: SvGrid resolves each sort clause once and precomputes a key array, and for a column whose distinct values are far fewer than its rows it collates the distinct values once and sorts by rank. Mounting is the other direction - see the accounting in benchmarks.
Two methodology notes, both of which were bugs in this harness before they were notes, and both of which changed the numbers by more than any code change did:
- Each grid runs in a fresh page. They used to run one after another in the same one, where the first warmed the JIT, fragmented the heap and left a hundred thousand rows of garbage for the next. Back-to-back runs on an idle machine disagreed with themselves by a factor of two. Run-to-run variance is now a few percent.
- Operations are timed until the DOM changes, not for a fixed two frames. The old fixed wait put a two-frame floor under every number - an operation that recomputed nothing at all measured the floor, and a mount whose rows were already in the DOM measured pure waiting - which flattered whichever grid was slower.
- Each figure is the fastest of the samples, not the median. Noise only ever adds time, so the minimum is the cleanest estimate of what the machine can do, and medians on this box drifted by a third between consecutive runs - more than most of the differences being measured. Applied identically to every grid.
What this table deliberately does not include:
- Features the grids do not measure the same way. Grouping, pivot, editing and export all differ enough in shape that a single timing would compare two different amounts of work. The filter row above is the one case we publish anyway, labelled, rather than quietly dropping a result that happens to favour us.
- Any grid we cannot license for this. The harness is grid-agnostic on purpose, but some commercial grids licence their software in ways that restrict using it to produce competitive claims. Where that is the case we do not ship an adapter, and we would rather have an obviously incomplete table than a legally dubious one. Run your own shortlist.
- Your workload. One dataset shape, one machine, one browser, default configuration for every grid. If a grid decision rides on this, clone the harness and put your own data in it.
Migrating from AG Grid
The most common starting point. See Migrating from AG Grid for a side-by-side translation of column defs, features, filtering, editing, and the imperative API. The example that guide is built around runs here:
Open the live example: AG Grid ↔ sv-grid side-by-side (Integrations)
Migrating from TanStack Table
The map is one-to-one - SvGrid's headless core speaks the vocabulary TanStack Table v9 introduced. The big differences:
- Replace
createTable(opts)withcreateSvGrid(opts). Same state machine, same features object. - Replace the row-model factories with the same names from
@svgrid/grid. - The render layer changes - TanStack hands you
FlexRender+ the row model; SvGrid lets you keep that headless approach OR drop in the default<SvGrid>component.
The headless demo below drives a plain <table> from createSvGrid, the
way a TanStack app would:
And the same rows through the render component, which is the part TanStack leaves to you. The example runs against these rows:
<script lang="ts">
import { SvGrid, type GridColumns } from '@svgrid/grid'
type Order = {
id: number
customer: string
region: string
status: string
amount: number
}
const orders: Order[] = [
{ id: 1, customer: 'Ada Lovelace', region: 'EMEA', status: 'open', amount: 1240 },
{ id: 2, customer: 'Grace Hopper', region: 'AMER', status: 'shipped', amount: 860 },
{ id: 3, customer: 'Linus Torvalds', region: 'EMEA', status: 'closed', amount: 2210 },
{ id: 4, customer: 'Radia Perlman', region: 'APAC', status: 'open', amount: 430 },
{ id: 5, customer: 'Barbara Liskov', region: 'AMER', status: 'pending', amount: 1780 },
]
let rows = $state<Order[]>(orders)
const columns: GridColumns<Order> = [
{ field: 'customer', header: 'Customer', width: 180 },
{ field: 'region', header: 'Region', width: 110 },
{ field: 'status', header: 'Status', width: 110 },
{ field: 'amount', header: 'Amount', width: 120, editorType: 'number', format: { type: 'currency', currency: 'USD' } },
]
</script>
<SvGrid data={rows} {columns} sortable filterable selectable />
Pricing
SvGrid Community is MIT - free for commercial use, no attribution required at runtime. SvGrid Enterprise is a per-developer licence: $599 per developer per year for a single application or $999 for multiple applications; see https://svgrid.com/pricing/ for what the pack adds.
AG Grid Community is MIT. AG Grid Enterprise is priced per developer with one year of updates; the figure ag-grid.com listed on the date we read it is in the facts block at the top of this page, and the SvGrid vs AG Grid page carries the link. Compare what each paid tier adds before comparing prices: most of what AG Grid sells as Enterprise is in SvGrid's free core.
TanStack Table is MIT and sponsor-funded; tanstack.com offers paid Enterprise Support as private consulting.
Frequently asked questions
What is the best data grid for Svelte 5?
For a Svelte-5-native grid with a batteries-included render component, SvGrid is built around runes and snippets. TanStack Table is a strong headless-only choice if you want to build the DOM layer yourself across frameworks, and its v9 Svelte adapter targets Svelte 5. AG Grid is the most feature-complete but lives in React, Angular and Vue first and reaches Svelte through community-built integrations.
Is SvGrid a good AG Grid alternative?
Yes, for Svelte projects. SvGrid is a fraction of AG Grid Community's
measured size on a Svelte page (the facts block has both numbers and the
method), is MIT-licensed for commercial use, and offers @svgrid/enterprise
for export, print, import and pivot at a per-developer price. On the
benchmark above it sorts a hundred-thousand-row column faster on both
column types and scrolls level; AG Grid mounts quicker. It does not match
every AG Grid Enterprise feature - see the
missing-features list for the gaps.
SvGrid vs TanStack Table - which should I pick?
Pick SvGrid if you want virtualization, Excel-style filters, selection, and inline editing working out of the box on Svelte 5. Pick TanStack Table if you want a framework-agnostic headless engine and are happy to build the rendering, virtualization, and editing UI yourself. Both are MIT-licensed.
Does the TanStack Svelte adapter support Svelte 5?
Yes. The @tanstack/svelte-table v9 line declares a Svelte 5 peer range
and passes data through getters rather than stores; the facts block above
shows the version read from npm. The earlier createSvelteTable constructor
is gone in v9.
Does AG Grid have an MCP server like SvGrid?
Yes. ag-mcp (MIT) gives an assistant AG Grid's docs, examples and
version-specific upgrade prompts. @svgrid/mcp does the same for SvGrid
and adds a code checker that validates props and imports against the real
API surface, a scaffold tool and a preview. Neither is an in-grid feature;
SvGrid's natural-language filter, smart fill and summarise helpers are, and
they ship free in @svgrid/grid with a model provider you register.
How big is the SvGrid bundle?
The facts block at the top of this page has the measured gzipped size of the
full <SvGrid> render component and its stylesheet, read from
docs/_data/svgrid-size.json, which pnpm size:json writes. The
bundle size reference breaks it down by entry:
the headless core on its own, the core subpath, the charts, and the lazy
chunks that load on demand.
See also
- Why headless? - the design decision behind SvGrid's two-layer architecture.
- Migrating from AG Grid - the practical recipe.
- Migrating from TanStack Table - the one-to-one API map.
- Benchmarks - how the numbers are produced and what they leave out.
- Enterprise feature pack - what SvGrid charges for.
- Missing features - the honest gap list versus AG Grid Enterprise.
- All comparisons - one page per grid, with dated sources for every claim.
Live examples
- AG Grid ↔ sv-grid side-by-side - Two real grids over the same dataset: AG Grid Community v35 on the left, sv-grid on the right. Same global filter drives both. Source code panels for either side.
- Headless -> your own table - No <SvGrid>: the createSvGrid engine sorts + filters, and this component renders a plain, hand-styled <table>. The engine does the logic; you own the markup.
Related articles
- Evaluating SVAR Svelte DataGrid? What Changes if You Pick SvGrid - A fair comparison of SVAR Svelte DataGrid and SvGrid - both MIT, both Svelte-native - covering suite breadth, grouping and pivot, the headless engine, download numbers, and what porting actually costs.
- Using SvGrid with TanStack Query in Svelte - Wire TanStack Query's caching and background refetch into SvGrid for a server-driven grid that pages instantly and never shows a blank screen.
- Bundle Size of Svelte Data Grids - How to Compare - README bundle numbers are nearly useless. Here is how to measure the real delta a data grid adds to your Svelte app, and why feature-gated architectures change the math entirely.