# jsdom: 7.1 out of 10

A strong pick. 5th of 10 in [Web scraping and HTML parsing](https://elestia.ai/opensource/scraping/index.md).

jsdom is the most complete pure-JavaScript browser DOM for Node.js. It is the right pick when code needs real DOM APIs, for example with Readability, DOMPurify or tests. For plain scraping, Cheerio or htmlparser2 is lighter and faster, and pages that need JavaScript rendering are better served by Puppeteer.

**Best for:** Node projects that need a standards-faithful DOM, such as running Readability or DOMPurify, or DOM-heavy tests, without starting a real browser.

## Scores

- **Overall: 7.1** (likely 6.1 to 8.1)
  - Claude Opus 5.5 (7.0): It is a strong, well-maintained pick when you need a real DOM in Node, and the most complete option there. For the category's core job of loading and reading HTML, Cheerio or htmlparser2 is the lighter default, and Puppeteer handles pages that render with JavaScript. Frequent breaking majors and a lower speed than Happy DOM and LinkeDOM keep it below the top.
  - GPT-6.2 Sol (7.2): Pick jsdom when downstream code needs standard DOM objects on Node.js and an actively maintained implementation. Cheerio is the better default for static extraction, and Puppeteer fits pages that depend on real navigation or rendering. The recommendation depends on how much DOM behavior the project needs and how the current release performs on its pages.
- **Needed by many: 5.3** (likely 4.1 to 6.4)
  - Claude Opus 5.5 (6.0): Many JavaScript developers need a DOM in Node, mostly for tests and partly for scraping, sanitising or extracting content. Within this category, most scraping jobs need only a parser like Cheerio or else a real browser. So jsdom's full-DOM approach fits a large group, but not most projects.
  - GPT-6.2 Sol (4.5): Fetching and parsing HTML serves extraction, content processing, and server-side tooling. jsdom fits the smaller group that needs browser-style DOM objects on Node.js, with additional demand from testing. The available survey measures test runners, leaving the share of developers who need jsdom's approach to scraping uncertain.
- **Helps a lot: 7.2** (likely 6.1 to 8.2)
  - Claude Opus 5.5 (7.0): jsdom is the most spec-faithful DOM available without a browser. v31 rewrote the CSS engine and added parsing that pauses at blocking scripts. The limits are speed (2–4x slower than Happy DOM in test suites), no layout, and partial script and browser behaviour. For the category's main job of reading HTML, Cheerio does it faster with a simpler API.
  - GPT-6.2 Sol (7.3): The documented loading APIs, familiar DOM methods, and configurable console make common tasks easy to write and debug. TypeScript uses separate declarations, and blocked parsing in v31 can make older examples read the tree too early. A third-party October benchmark found Cheerio faster and less memory-intensive on bulk extraction with jsdom 30.1.3. The 31.0.1 performance fixes leave the current size of that gap uncertain, and browser-dependent jobs still need layout or navigation that jsdom lacks.
- **Holds up over time: 7.8** (likely 6.7 to 8.8)
  - Claude Opus 5.5 (8.0): It has 328 commits and 17 npm versions in the last year, and two majors shipped in 2026 with steady patch releases. The project has run for 15 years and has 390 contributors. Two things keep the score from being higher: much of the work rests on a small core of maintainers, and frequent majors with Node minimum bumps make upgrades churn.
  - GPT-6.2 Sol (7.5): The project logged 328 commits and 17 npm versions in a year, and maintainers followed up on user-reported style slowdowns. Recent majors raised the Node.js floor and changed parsing timing and the optional canvas backend. Several contributors ship fixes, but the release log shows one account publishing recent releases. The project describes a volunteer team and offers paid support through Tidelift, with limited visibility into funding and release access.
- **Used widely: 8.2** (likely 7.0 to 9.4)
  - Claude Opus 5.5 (9.0): It had 626M downloads in 4 weeks and has 1.44M dependent repos, the largest in the category after htmlparser2. Much of that comes from test environments rather than scraping. Its year-over-year ratio of about 4.2 only matches the 4.1 median, while Happy DOM and LinkeDOM grow much faster from smaller bases.
  - GPT-6.2 Sol (7.4): Downloads rose 4.20× year over year, just above the catalog's 4.1× baseline and ahead of Cheerio and Puppeteer. Ecosyste.ms found 1.44 million dependent repositories, second to htmlparser2 among peers with counts. Jest's environment installs jsdom as a dependency, so automated tests likely account for substantial download volume. The data leave direct scraper adoption and its growth uncertain.
- **Vouched for: 7.9** (likely 6.8 to 8.9)
  - Claude Opus 5.5 (8.0): Jest and Vitest offer jsdom as their standard DOM environment. Mozilla's Readability and DOMPurify document it for server use. Independent comparisons treat it as the compatibility benchmark. Validation for scraping specifically is weaker than for testing.
  - GPT-6.2 Sol (7.8): Vitest supports jsdom and Jest's DOM environment depends on it. Mozilla Readability demonstrates it for extraction, and DOMPurify recommends the latest release for server-side sanitization. These are direct endorsements of its DOM behavior, while surveys cover the test runners and evidence from current production scrapers is thinner.
- **Safe: 7.0** (likely 6.0 to 8.1)
  - Claude Opus 5.5 (7.0): It has no OSV advisories and an MIT licence. It pulls in 18 dependencies, and its OpenSSF Scorecard is 6.9, with weak code-review, pinned-dependency, SAST and fuzzing checks. Running untrusted page scripts with runScripts 'dangerously' can reach Node, so it must stay off for scraped pages.
  - GPT-6.2 Sol (7.0): jsdom uses the permissive MIT license, disables page scripts by default, and has zero direct advisories in the supplied OSV snapshot. Enabling page scripts can give that code access to Node.js, and the package has 18 direct dependencies. A tag-triggered GitHub Actions workflow publishes to npm, but the number of people who can trigger a release is unclear. The 6.9 Scorecard shows weak code review and dependency pinning, and downstream maintainers document security-relevant parser bugs fixed in earlier versions.

## Good

- It implements web standards in more depth than Happy DOM or LinkeDOM, including CSS cascade, computed styles, custom elements and XHR.
- It is very actively maintained, with frequent releases in 2026 that bring both speed work and spec fixes.
- It is the reference DOM for Node tooling: Jest's jsdom environment, Vitest, Readability and server-side DOMPurify all document it.
- It has no known security advisories and an MIT licence.

## Bad

- It is much slower and heavier than Cheerio, htmlparser2 or LinkeDOM when you only need to read HTML.
- Three major versions in about a year (29, 30, 31) brought breaking changes and raised the minimum Node.js version.
- It does no layout or rendering, so it cannot replace a real browser for pages that render with JavaScript.
- Types come from the separate @types/jsdom package, and running a page's scripts with runScripts is unsafe for untrusted pages.

## The numbers

- Downloads, 4 weeks: 626M
- In a year: ×4.2
- GitHub stars: 22k
- Commits, 12 months: 328
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/jsdom/jsdom
- npm: https://www.npmjs.com/package/jsdom

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
