Elestia Open Source Ratings
5.5

Happy DOM

Reasonable, with limits. 8th of 10 web scraping and HTML parsing.

Happy DOM is a fast JavaScript DOM and browser implementation for Node. It is used mostly as the DOM environment for Vitest tests. For scraping and parsing HTML it works, but Cheerio or htmlparser2 parse HTML more simply, Puppeteer loads real pages more faithfully, and Happy DOM's 2026 record of RCE and SSRF advisories with untrusted HTML makes it a risky choice for reading pages from the open web.

Best for: Teams that want a fast, in-process DOM for unit tests or for trusted HTML, and do not need a real browser.

GitHubnpm

Scores

Overall5.5

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

Happy DOM is a good, fast DOM for tests. In the web scraping and HTML parsing category, Cheerio or htmlparser2 parse HTML better, and Puppeteer or Crawlee load real pages better. Its run of security advisories around untrusted HTML argues against pointing it at the open web. Choose it for trusted HTML or test-like workloads only.

  • peers: Cheerio, htmlparser2, Puppeteer and jsdom have far broader direct use
  • advisories recent: SSRF and RCE advisories in 2026
  • pkgpulse.com/guides/happy-dom-vs-jsdom-2026: Recommended for fast Vitest suites, not scraping

GPT-6.2 Sol: 5.9, likely 4.7 to 7.1

Happy DOM is actively maintained and useful when extraction code needs browser-style DOM objects for trusted HTML. Choose Cheerio for straightforward static extraction or Puppeteer for pages that depend on client-side rendering. Current selector gaps and limited evidence from production scrapers make the recommendation depend on the pages you need to handle.

Needed by many4.7

How many developers need a tool for this job?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

Many front-end developers need a headless DOM for tests. Fewer need one to load and read web pages, which is this category's job. Happy DOM's in-process browser fits that job only for simple, trusted pages. Most scraping needs go to a parser or a real browser instead.

GPT-6.2 Sol: 4.3, likely 3.1 to 5.7

Loading and reading HTML is a recurring need in scraping and data pipelines. Happy DOM fits the smaller group that wants browser-style DOM APIs without launching a browser. Testing gives it a wider audience, but available usage data makes it hard to size the scraping audience.

Helps a lot5.7

How well does it do the job for those who need it?

Claude Opus 5.5: 5.0, likely 4.0 to 7.0

It parses HTML and offers a broad DOM, fetch and a Browser API, and it is quicker than jsdom. Users report missing or partial APIs (getComputedStyle, Shadow DOM, SVG, history), and some jsdom behaviours differ. For scraping, JS evaluation is now off by default for safety, and the SSRF advisory shows that parsing untrusted HTML can trigger outbound requests. Cheerio or a real browser does the scraping job better.

GPT-6.2 Sol: 6.4, likely 5.3 to 7.6

Version 21.0.4 combines documented navigation with familiar DOM methods and bundled types. These APIs give coding agents a familiar starting point. Users reproduced selector bugs on this release, and the emulator lacks a layout engine. Independent speed tests favor Happy DOM over jsdom on several test workloads, but they leave scraping throughput uncertain.

Holds up over time6.3

Will it still be a good choice in two years?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Development is active, with 132 commits and 81 releases in the last year and a push three days before the read date. The work rests mostly on one maintainer, and 187 pull requests are open. Major versions with breaking changes come often. Vitest support keeps the ecosystem tied to it.

GPT-6.2 Sol: 6.6, likely 5.2 to 7.8

The project shipped 81 releases and recorded 132 commits in the past year. A single listed npm maintainer and a substantial issue and pull request backlog make long-term support less predictable. Recent major releases tightened defaults for good security reasons, though downstream projects still had to accommodate the changes.

Used widely5.5

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Downloads rose about 11x in a year, to 138M per 4 weeks. That is far above the 4.1 median, but the jump is so sharp that a popular tool probably installs it as a dependency. Dependents (3,800 repos) are tiny next to jsdom's 1.4M and Cheerio's 557k, though they are above LinkeDOM's. Most direct use is in tests rather than scraping.

  • npm downloadsLast4Weeks: 137.8M vs 12.2M a year ago, ratio ~11.3
  • dependents.repos: 3,800 repos, far below jsdom and Cheerio
  • pkgpulse.com/guides/happy-dom-vs-jsdom-2026: About 3M weekly in March 2026 vs jsdom about 27M
  • bluesky posts: 8 posts, low attention similar to peers

GPT-6.2 Sol: 5.0, likely 3.6 to 6.4

Four-week downloads rose to 137.8 million, or 11.3 times the year-earlier count against a catalog median of 4.1 times. The dependency index found 3,800 repositories and 1,713 npm packages, with far fewer indexed repositories than for Cheerio or jsdom. Test automation and installs through companion packages make it hard to infer how much of that growth comes from new scraping projects.

  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo and medianDownloadsRatio: 137.8 million versus 12.2 million downloads, with growth above the catalog baseline.
  • dependents, peers dependentRepos and github stars: 3,800 indexed repositories and 4,754 stars. Cheerio and jsdom have much larger indexed footprints.
  • bluesky posts and peers blueskyPosts: Eight repository-link posts, including a report of faster Vitest runs.
  • bun.com/docs/test/dom: Documents Happy DOM as a development dependency for tests.
  • npmjs.com/package/%40happy-dom/global-registrator?activeTab=versions: The companion package has millions of weekly installs.
Vouched for5.4

Who stands behind it being good?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

Vitest ships it as a first-class environment, and independent guides recommend it for fast test suites. Its users are mostly Vue/Nuxt and Vitest projects. There are no independent endorsements of it as a scraping tool, and comparisons still describe jsdom as more mature.

GPT-6.2 Sol: 5.8, likely 4.5 to 6.9

Vitest, Bun, and Angular support Happy DOM for tests, and Apache Airflow uses it in its UI test suite. Independent benchmarks find a speed advantage on some DOM test workloads. Evidence from production scrapers is sparse, which limits how far those endorsements carry in this category.

Safe4.6

How safe is it to depend on?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

There were seven advisories in 24 months, mostly high severity. They include a VM escape, RCE through the module compiler, an incomplete fix for that RCE, cookie scope flaws and SSRF on untrusted HTML. Fixes did ship, but repeat issues in the same area are a concern for a scraping tool. The Scorecard is 6.4, with weak Code-Review and Token-Permissions. The licence is MIT and it has only 7 dependencies.

GPT-6.2 Sol: 5.1, likely 3.9 to 6.4

The recent server-side request forgery and host code execution fixes are both in 21.0.4 and shipped by public disclosure. One fixed a gap left by earlier remediation, and the project warns against running untrusted JavaScript in the application process. The package uses MIT and has seven direct dependencies, and the publishing workflow runs tests before release. Weak review and token-permission scores, a single listed npm maintainer, and the difference between parsing and script execution keep the range wide.

Good

  • Faster startup and parsing than jsdom, which shortens large Vitest suites.
  • Vitest supports it as a built-in environment, and switching is a one-line config change.
  • Ships TypeScript types, is MIT-licensed and has only 7 dependencies.
  • Very frequent releases: 81 in the last year, so fixes land quickly.

Bad

  • Seven advisories in 24 months, including RCE in its module compiler, an incomplete fix for it, and SSRF when parsing untrusted HTML.
  • Less complete than jsdom for computed styles, Shadow DOM, SVG and some navigation APIs.
  • Mostly one maintainer, with 187 open pull requests and a weak Code-Review score.
  • Breaking majors come often (v19 dropped CommonJS, v20 turned JS evaluation off by default, then v21).

The numbers

npm downloads, 4 weeks
138M ×11 in a year
GitHub stars
4.8k
Commits, 12 months
132
npm version
21.0.4 Oct 2026
Versions, 12 months
82
Advisories, 24 months
7 of 8 ever
OpenSSF Scorecard
6.4 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (capricorn86/happy-dom), npm (happy-dom), OSV and the OpenSSF Scorecard.

Web scraping and HTML parsing

  1. 8.1Cheerio
  2. 7.9Puppeteer
  3. 7.8Crawlee
  4. 7.3htmlparser2
  5. 7.1jsdom
  6. 6.8Stagehand
  7. 6.8Readability
  8. 5.5Happy DOM
  9. 5.4LinkeDOM
  10. 5.2Selenium WebDriver
Compare all 10 on six scores