node-canvas
Reasonable, with limits. 7th of 9 image processing libraries.
node-canvas is the oldest Canvas 2D API for Node.js, built on Cairo. It is still maintained and widely installed, but @napi-rs/canvas now does the same job with easier installs and faster growth. It also does not handle resizing or converting photos, which is sharp's job. It is a reasonable choice when you need Cairo-specific output such as PDF, or when a library you use requires it. For most new projects, pick another tool.
Best for: Projects that need a Cairo-backed canvas with PDF/SVG output, or that use tools built on `canvas`, such as jsdom, Fabric.js or chartjs-node-canvas.
Scores
Overall5.3
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It is a working, maintained Canvas API for Node.js with a large installed base. For new projects, @napi-rs/canvas does the same job with no system dependencies, better speed and faster growth. sharp is the right tool for resizing and converting images. node-canvas still makes sense when you need Cairo's PDF output or a library built on it.
- peers @napi-rs/canvas: A peer doing the same job grew about 24x and is far ahead in downloads
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: An independent guide prefers @napi-rs/canvas for new projects
- npm downloadsLast4Weeks: Growth is below the median
- github.com/Automattic/node-canvas/releases: Still releasing fixes in 2025–2026
GPT-6.2 Sol: 5.6, likely 4.3 to 6.8
Choose node-canvas when Cairo output, multipage PDF drawing, or compatibility with existing code is a requirement. For a new Canvas 2D service, @napi-rs/canvas has easier native deployment and stronger recent momentum. Sharp is the better fit for routine resizing and format conversion. The open JPEG report and limited maintenance capacity weigh on stable v3, while the v4 candidate leaves its longer-term outlook uncertain.
- github.com/Automattic/node-canvas/blob/v3.2.3/Readme.md: Cairo drawing and multipage PDF support
- github.com/Brooooooklyn/canvas: Skia backend ships binaries without separate graphics libraries
- sharp.pixelplumbing.com: Dedicated resizing and conversion features
- peers: Sharp and @napi-rs/canvas have stronger recent momentum
- github.com/Automattic/node-canvas/issues/2566: Open memory-safety report against stable v3
- github.com/Automattic/node-canvas/issues/2630: Maintainer reports limited capacity
- github.com/Automattic/node-canvas: V4 improvements are in prerelease
Needed by many3.9
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Drawing on a canvas on the server is a clear niche: chart rendering, generated images, PDF rendering and DOM tests under jsdom. It runs only in Node.js and does not resize or convert photos, which most users of this category need. So it serves a smaller group than sharp.
- github description: Cairo-backed Canvas implementation for Node.js only
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: Server-side canvas use cases such as OG images, charts and PDFs
GPT-6.2 Sol: 3.8, likely 2.7 to 5.0
Server-side drawing serves a clear niche that includes charts, generated graphics, and PDFs. The native renderer targets Node.js, and routine resizing and conversion have broader format support in sharp. The developer survey gives context on Node.js use, while demand for server-side Canvas 2D is harder to measure.
- github.com/Automattic/node-canvas/blob/v3.2.3/Readme.md: Node.js drawing API and supported outputs
- survey.stackoverflow.co/2025/technology: Developer survey covers Node.js use
- sharp.pixelplumbing.com/api-output: Broader output formats for image conversion
- chartjs.org/docs/latest/getting-started/using-from-node-js: Server-side chart rendering use case
Helps a lot6.4
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
The Canvas API is mature and close to the browser's. It has types, PDF/SVG backends, and the 3.x line made font parsing faster and moved to N-API. Install friction from system libraries is still a real cost. Independent guides rate it slower than the Skia-based peers, and @napi-rs/canvas is easier to deploy.
- github.com/Automattic/node-canvas/releases: 3.x adds N-API, a faster font parser, PDF links and arm64 prebuilds
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: Rated Moderate speed; needs Cairo/Pango, adding 40-80MB to images
- station.railway.com/questions/canvas-deployment-issue-on-railway-nod-d01fbf3f: Users hit missing prebuilds and failed source builds on Node 22
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 6.7, likely 5.6 to 7.8
Stable v3.2.3 has documented drawing and export APIs, built-in types, and custom fonts. Its familiar drawing methods and examples give coding agents a good starting point, though a user reproduced incorrect text bounds on the stable build. An independent PDF.js benchmark found node-canvas slower than @napi-rs/canvas on two PDFs, and performance across other drawing workloads remains uncertain.
- github.com/Automattic/node-canvas/blob/v3.2.3/Readme.md: Drawing examples, custom fonts, and export options
- npm.hasTypes: Bundled TypeScript declarations
- github.com/Automattic/node-canvas/issues/2620: User reproduced incorrect text bounds in 3.2.3
- pdf-raster.omsimos.com/docs/benchmark: Two PDF.js cases favored the Skia backend
Holds up over time4.9
Will it still be a good choice in two years?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
The project is active, with 86 commits and 3 releases in the last year, and it was pushed in November 2026. The last release, however, was in March 2026. One maintainer published every recent release, and 402 issues are open. The ecosystem is moving towards @napi-rs/canvas, as the pdf.js switch shows.
- github commitsLastYear / releasesLastYear: 86 commits, 3 releases; latest v3.2.3 on 2026-03-31
- github.com/Automattic/node-canvas/releases: All recent releases were published by one maintainer, chearon
- forgejo.fifo-f.eu/mirrors/pdf.js/commits/tag/v5.1.91/examples: pdf.js replaced canvas with @napi-rs/canvas over install problems
- github openIssues: 402 open issues
GPT-6.2 Sol: 4.8, likely 3.6 to 6.3
The project recorded 86 commits and three stable releases in the past year, and a reported GCC regression shipped a fix in nine days. The last stable release was in March, and the recent stable releases came from one GitHub account. A maintainer reports no funding and limited volunteer time, while jsdom has moved to @napi-rs/canvas. Active v4 release-candidate work leaves room for improvement, with its stable release timing and future patch cadence uncertain.
- github.commitsLastYear, github.releasesLastYear, github.latestRelease: 86 commits, three releases, latest in March
- github.com/Automattic/node-canvas/releases: One GitHub account cut the recent stable releases
- github.com/Automattic/node-canvas/issues/2559: March regression fixed in the next patch
- github.com/Automattic/node-canvas/issues/2630: Maintainer reports limited volunteer time and no funding
- github.com/Automattic/node-canvas: V4 candidate expands binaries and adds worker support
- github.com/jsdom/jsdom/releases/tag/v31.0.0: jsdom switched its optional canvas backend
Used widely5.9
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It has 45M downloads in 4 weeks and 38k dependent repos, a large installed base that is mostly chosen directly or through optional peer integrations. Its year-over-year ratio of 2.8x is below the 4.1 median, so it is losing share. @napi-rs/canvas grew about 24x over the same period.
- npm downloadsLast4Weeks: 45.4M now vs 16.4M a year ago, a ratio of 2.77, below the 4.1 median
- dependents: 38,000 repos and 4,367 packages
- peers @napi-rs/canvas: 210M downloads, up from 8.7M a year ago
- github stars: 10.7k stars
GPT-6.2 Sol: 5.7, likely 4.5 to 6.7
Ecosyste.ms found about 38,000 dependent repositories and 4,367 packages, a substantial footprint that trails sharp and Jimp in tracked repositories. Four-week downloads rose from 16.4 million to 45.4 million, or 2.77×, below the 4.1× catalog median and well behind @napi-rs/canvas growth. Automated and downstream installs blur how many projects actively chose it, and jsdom’s switch points to weaker future uptake.
- dependents: 38,000 tracked repositories and 4,367 packages
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: 2.77× growth against a 4.1× median
- peers: Sharp and Jimp lead tracked reach, and @napi-rs/canvas grew about 24×
- github.com/fabricjs/fabric.js: Fabric’s Node integration pulls in node-canvas
- github.com/jsdom/jsdom/releases/tag/v31.0.0: A major downstream integration moved away
Vouched for5.9
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 4.5 to 7.0
Automattic hosts it, and long-lived tools build on it, such as jsdom's optional canvas support, Fabric.js and Konva in Node, and chartjs-node-canvas. Current independent write-ups recommend it only for existing codebases or Cairo-specific needs. One major consumer, pdf.js, has moved away from it.
- jsdom / Fabric.js / chartjs-node-canvas: Long-standing integrations rely on the canvas package
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: Recommends @napi-rs/canvas as the default and node-canvas for legacy or Cairo needs
- forgejo.fifo-f.eu/mirrors/pdf.js/commits/tag/v5.1.91/examples: pdf.js dropped it
GPT-6.2 Sol: 5.7, likely 4.5 to 6.9
Fabric uses node-canvas for its Node.js backend, and Chart.js lists it as an option for server-side chart rendering. Those integrations establish practical use, while jsdom’s switch weakens the case for new adopters. Recent evidence on production reliability and developer satisfaction is thin.
- github.com/fabricjs/fabric.js: Fabric documents node-canvas as its Node drawing backend
- github.com/fabricjs/fabric.js/releases: Fabric’s release history shows an upgrade to 3.2.3
- chartjs.org/docs/latest/getting-started/using-from-node-js: Chart.js lists node-canvas for server rendering
- github.com/jsdom/jsdom/releases/tag/v31.0.0: jsdom now uses a competing backend
Safe5.1
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 4.5 to 7.0
It is MIT-licensed with only 2 dependencies and no advisories in the last 24 months. Still, it is native C++ code that parses untrusted images: there was a buffer overflow in 2021, and v3.2.2 fixed memory-safety issues in getImageData/putImageData. The OpenSSF Scorecard is 3.7, with no security policy, no branch protection, no signed releases and no fuzzing.
- advisories: 2 total (2019 DoS, 2021 buffer overflow), 0 in the last 24 months
- scorecard score: 3.7; Security-Policy, Branch-Protection, Signed-Releases, Fuzzing and SAST all 0
- github.com/Automattic/node-canvas/releases: v3.2.2 fixed security issues in getImageData/putImageData
- npm dependencies / license: 2 deps, MIT
GPT-6.2 Sol: 4.1, likely 2.9 to 5.5
The MIT package has two direct npm dependencies, and its install script downloads a native binary or builds it locally. Both older catalogued advisories were patched, and 3.2.2 shipped additional security fixes. A JPEG decoding memory-safety report against 3.2.3 remains open, with no stable fix identified. Private reporting is now documented, while weak code review, workflow token permissions, and dependency pinning remain concerns in the October Scorecard.
- app.unpkg.com/canvas%403.2.3/files/package.json: MIT license, two direct dependencies, native install script
- github.com/advisories/GHSA-73rg-x683-m3qw: Older buffer overflow patched in 1.6.11
- github.com/advisories/GHSA-vpq5-4rc8-c222: Older denial of service patched in 1.6.10
- github.com/Automattic/node-canvas/releases/tag/v3.2.2: March patch included security fixes
- github.com/Automattic/node-canvas/issues/2566: JPEG decoding report remains open
- github.com/Automattic/node-canvas/security: Project now provides a private reporting route
- scorecard: 3.7 overall, with weak review and workflow controls
Good
- It closely follows the browser Canvas 2D API and has 15 years of fixes behind it.
- It can render to PDF and SVG canvases through Cairo, including PDF links and accessibility tags in 3.1.
- Version 3 moved to N-API with prebuilds, including arm64 Linux, so fewer installs break when Node changes major versions.
- Many libraries already integrate with it, with about 38k dependent repos and 4.4k dependent packages.
Bad
- Builds from source need Cairo, Pango and libjpeg system libraries, which add weight to Docker and Lambda images and cause install failures.
- In third-party comparisons it is slower than the Skia-based peers.
- pdf.js replaced it with @napi-rs/canvas because it was hard to install, and its download growth is below the median.
- Almost all releases come from one maintainer, and the OpenSSF Scorecard is low at 3.7/10.
The numbers
- npm downloads, 4 weeks
- 45M ×2.8 in a year
- GitHub stars
- 11k
- Commits, 12 months
- 86
- npm version
- 3.2.3 Mar 2026
- Versions, 12 months
- 3
- Advisories, 24 months
- 0 of 2 ever
- OpenSSF Scorecard
- 3.7 out of 10, Oct 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (Automattic/node-canvas), npm (canvas), OSV and the OpenSSF Scorecard.