svgworm compared with other SVG icon tools
An honest comparison. For each tool it says what it does well and when to pick it instead of svgworm.
- Numbers: they come from the spikes in the repo, and each one links to its source.
- Untested tools: where we did not test a tool ourselves, the page says so.
Versions, dates and download counts come from npm on 2026-10-08 (competitive landscape).
Short version#
| If you… | Use |
|---|---|
| Have your own icon folder in Next.js (App Router) or Astro and want zero client JS, no glue | svgworm |
| Want one component per icon, tree-shaken, and accept the JS cost | SVGR |
| Use Vite, want a sprite plus types, and your icons are all single-color | vite-plugin-icons-spritesheet |
| Need several sprites, a watcher, or a webpack plugin today | @neodx/svg |
| Want icons from public sets (Lucide, Material, …) without owning SVG files | unplugin-icons / Iconify |
What svgworm does differently#
- Per-icon color. Each icon is classified as mono or multicolor. Mono icons follow
currentColor; multicolor icons keep their colors. In TSK-003 the classifier agreed with rendering on 99.98% of 31,390 icons and recolored no multicolor icon. - Gradients, masks and filters render in every engine. WebKit resolves no
url(#…)reference inside an external<use>sprite (TSK-002). Gradient, mask and filter icons come out blank there. svgworm puts those icons in a second “stack” file and delivers them as<img>(multicolor) or a CSS mask (mono). TSK-004 renders all of them in Chromium, Firefox and WebKit with JavaScript disabled. - No bundler plugin required. It is a CLI that writes files, so it works the same under Turbopack, webpack and Vite. In Vite, the optional
svgworm/viteplugin rebuilds invite dev. - Deterministic output. The same input gives byte-identical files. Names are Unicode-normalized, so an NFC and an NFD
café.svggive the same name and id (TSK-006). - Errors, not silent fixes. Name collisions and invalid SVGs stop the build and write nothing.
Client JS, measured#
The same 20 Lucide icons, rendered three ways in one Next.js 16 App Router app built with Turbopack: svgworm, lucide-react, and SVGR importing the same lucide-static files. Each runs on a Server Component page and inside one small 'use client' component.
A route with no icons gives the framework floor (130.1 KiB gzip of client JS), which the second column subtracts. The setup is cold cache, Chromium, one run on one machine (TSK-079 spike; reproduce with pnpm measure in that folder).
| Variant | Client JS over the floor, raw / gzip | HTML raw / gzip | Requests for icons |
|---|---|---|---|
| svgworm, server page | 0 / 0 KiB | 13.5 / 2.0 KiB | 1 sprite (5.3 KiB, 1.2 gzip) |
| svgworm, client | 4.2 / 1.5 KiB (the manifest) | 8.0 / 1.8 KiB | 1 sprite, 1 chunk |
| lucide-react, server | 2.5 / 1.2 KiB | 20.0 / 3.7 KiB | 1 chunk |
| lucide-react, client | 7.7 / 3.3 KiB | 12.6 / 2.8 KiB | 1 chunk |
| SVGR, server page | 0 / 0 KiB | 22.4 / 3.5 KiB | none |
| SVGR, client | 10.3 / 2.1 KiB | 12.4 / 2.9 KiB | 1 chunk |
Versions: next 16.3.8, react 19.3.0, lucide-react and lucide-static 1.50.0, @svgr/webpack 8.1.0, svgworm built from the repo.
- On a server page, svgworm and SVGR add no client JS.
lucide-react1.50.0 still ships a chunk there, because itsIconis a Client Component. - Inside a client component, the icon code reaches the bundle in every approach. svgworm sends the manifest (ids and view boxes, no path data). The others send path data.
- The gaps are small: 1 to 3 KiB gzip for 20 icons against a 130 KiB floor. They grow with the number of icons used in client components.
- Trade-offs: svgworm costs a build step and one extra request, which is cached for a year. SVGR needs no extra request, but it puts the markup into the HTML and the RSC payload of every page. svgworm is 0.x.
@neodx/svg#
The closest competitor. MIT, CLI plus Node API plus unplugin, multiple sprites, hashed files, typed metadata.
We tested version 1.1.1 in Next.js 16.4 with Turbopack (TSK-007):
| Check | Result |
|---|---|
Documented setup (@neodx/svg/webpack) |
Fails under Turbopack. Works with next build --webpack. Reported: neodx#186 |
Node API as a prebuild script |
Works, about 12 lines of glue |
| Server Components, zero client JS | Works |
| Types and hashed URLs | Work |
| Multicolor icons, default config | Silently flattened to currentColor |
| Gradient and mask icons | Blank in SSR with the default inline: 'auto'; a 20-line workaround fixes it. Reported: neodx#187 |
| NFC vs NFD file name | Different id and sprite hash. Reported: neodx#188 |
Pick neodx when you need multiple sprites or a webpack plugin now, or you are happy to set color rules by hand. Its defaults are tunable. What we hit is the default behavior, not a hard limit. It has about 2k weekly downloads.
SVGR#
Turns each SVG into a React component. It has 21.6M weekly downloads for @svgr/core.
- Strengths: works with any bundler, tree-shakes, every icon is a normal component you can style or animate, huge ecosystem.
- Cost: every icon becomes JavaScript. The path data is repeated in the HTML each time the icon is rendered on the server. A sprite sends the path data once, in a cacheable file.
- Not measured: we have not run a bundle-size benchmark against SVGR. We do not publish a size ratio until we have one that anyone can reproduce.
Pick SVGR when you have a small icon set, need per-icon animation or props on inner paths, or you are not on a framework with Server Components.
Switching from SVGR: npx svgworm migrate svgr rewrites the imports into <Icon name="…" /> calls and lists any import it leaves. See Migrate from SVGR.
vite-plugin-icons-spritesheet#
A Vite plugin that builds a sprite and types from a folder, and rebuilds on change. It has 248k weekly downloads.
- Strengths: tight Vite integration, hot rebuild in dev, simple.
- Gaps, from its docs (competitive landscape): tied to Vite, one sprite, and limited color handling.
- Not tested: we did not run it in a spike.
Pick it when you are on Vite and your icons are single-color.
unplugin-icons and Iconify#
Pull icons from public sets on demand and compile them to components. They have 841k weekly downloads.
Pick it when you want icons from public sets and do not own SVG files. svgworm is for your own folder. It does not fetch icons.
Where to check our claims#
Every spike has a script and a results file. Run them yourself:
| Claim | Source |
|---|---|
| Color classification, 31,390 icons | spikes/TSK-003-color-classification |
WebKit and external <use> references |
spikes/TSK-002-external-use |
| Delivery forms in 3 engines, JS off, Next 16 | spikes/TSK-004-sprite-url |
| neodx in Next 16 + Turbopack | spikes/TSK-007-neodx-next |
| Naming and Unicode | spikes/TSK-006-icon-naming |
Found a mistake, or a tool we describe unfairly? Open an issue and we will correct this page.