jsdom
A strong pick. 5th of 10 web scraping and HTML parsing.
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
Overall7.1
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.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.
- zenrows.com/blog/jsdom-vs-cheerio: Cheerio is faster for static scraping; jsdom is heavier.
- github.com/jsdom/jsdom/releases: Active 2026 releases, with breaking changes in 30 and 31.
- dependents: Very broad adoption.
GPT-6.2 Sol: 7.2, likely 6.1 to 8.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.
- github.com/jsdom/jsdom/blob/v31.0.1/README.md: Experienced browser DOM users can use familiar APIs on Node.js.
- github.com/jsdom/jsdom/releases: Recent releases show active fixes and breaking upgrades.
- github.com/context-dot-dev/rusteerio/blob/main/bench/libraries/README.md: Cheerio led the previous jsdom major on bulk extraction throughput.
- pptr.dev: Puppeteer controls real Chrome and Firefox browsers.
Needed by many5.3
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.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.
- zenrows.com/blog/jsdom-vs-cheerio: Cheerio is preferred for static scraping; jsdom fits when a DOM environment is needed.
- dependents: 1.44M dependent repos show very wide need.
GPT-6.2 Sol: 4.5, likely 3.2 to 5.8
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.
- github.com/jsdom/jsdom/blob/v31.0.1/README.md: Node.js DOM emulation with URL, file, and fragment loading.
- survey.stackoverflow.co/2026/technology/data: Measures use of Jest and Vitest among testing-tool respondents.
- github.com/mozilla/readability: Shows a concrete server-side article extraction use case.
Helps a lot7.2
How well does it do the job for those who need it?
Claude Opus 5.5: 7.0, likely 6.0 to 8.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.
- github.com/jsdom/jsdom/releases: v30 and v31 add CSS engine rewrite, getComputedStyle speedups and many spec fixes.
- pkgpulse.com/guides/happy-dom-vs-jsdom-2026: jsdom is more complete but slower than Happy DOM.
- zenn.dev/odan/scraps/eae43b327f0e33: Independent re-test finds the speed gap smaller than Happy DOM's README claims.
- npm hasTypes: No bundled types; relies on @types/jsdom.
GPT-6.2 Sol: 7.3, likely 6.2 to 8.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.
- github.com/jsdom/jsdom/blob/v31.0.1/README.md: Documents loading APIs, error reporting, and browser limitations.
- raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/jsdom/package.json: TypeScript declarations are maintained separately.
- github.com/context-dot-dev/rusteerio/blob/main/bench/libraries/README.md: Cheerio processed more pages with less memory than jsdom 30.1.3 on the benchmark corpus.
- github.com/jsdom/jsdom/releases/tag/v31.0.0: Blocking scripts can pause parsing before the complete tree is available.
- github.com/jsdom/jsdom/releases/tag/v31.0.1: Improves selector matching, style reads, and detached tree construction.
Holds up over time7.8
Will it still be a good choice in two years?
Claude Opus 5.5: 8.0, likely 7.0 to 9.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.
- github commitsLastYear: 328 commits; latest release 13 Nov 2026.
- github.com/jsdom/jsdom/releases: 30.0.0 raised the Node minimum; 31.0.0 changed the canvas backend and parsing behaviour.
- scorecard Maintained: Maintained check scores 10.
GPT-6.2 Sol: 7.5, likely 6.3 to 8.6
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.
- github commitsLastYear and npm versionsLastYear: 328 commits and 17 npm versions in the last year.
- github.com/jsdom/jsdom/issues/3985: Users reported upgrade slowdowns and maintainers investigated.
- github.com/jsdom/jsdom/releases: Recent fixes involve multiple contributors and the same visible release account.
- github.com/jsdom/jsdom/blob/v31.0.1/README.md: Describes volunteer maintenance and Tidelift support.
Used widely8.2
How many use it, and is that growing?
Claude Opus 5.5: 9.0, likely 8.0 to 10.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.
- npm downloadsLast4Weeks: 626M now vs 149M a year ago, a ratio of about 4.2.
- dependents: 1,437,647 repos and 31,840 packages.
- peers Happy DOM: Happy DOM grew about 11x, so it is gaining share in the testing use.
GPT-6.2 Sol: 7.4, likely 6.0 to 8.7
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.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, and medianDownloadsRatio: 626.5 million versus 149.3 million installs, or 4.20× against 4.1×.
- dependents and peers: 1,437,647 repositories and 31,840 packages found by ecosyste.ms.
- github.com/jestjs/jest/blob/main/packages/jest-environment-jsdom/package.json: Jest's jsdom environment pulls in jsdom 26 as a dependency.
Vouched for7.9
Who stands behind it being good?
Claude Opus 5.5: 8.0, likely 7.0 to 9.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.
- github.com/vitest-dev/vitest/discussions/1607: Vitest users treat jsdom as the more complete option.
- pkgpulse.com/guides/happy-dom-vs-jsdom-2026: Recommended when tests rely on CSS, Shadow DOM or SVG.
- Readability README: Readability recommends jsdom for use in Node.
GPT-6.2 Sol: 7.8, likely 6.5 to 8.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.
- vitest.dev/guide/environment: Vitest provides a supported jsdom environment.
- github.com/jestjs/jest/blob/main/packages/jest-environment-jsdom/package.json: Jest uses an earlier jsdom major in its supported environment.
- github.com/mozilla/readability: Mozilla documents jsdom for server-side article extraction.
- github.com/cure53/DOMPurify: Recommends current jsdom for server-side sanitization.
- 2025.stateofjs.com/en-US/libraries/testing: Surveys Jest and Vitest with no separate jsdom rating.
Safe7.0
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.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.
- advisories total: Zero known advisories.
- scorecard score: 6.9 overall; Code-Review 3, Pinned-Dependencies 3.
- npm dependencies: 18 direct dependencies.
GPT-6.2 Sol: 7.0, likely 5.9 to 8.1
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.
- advisories and npm: Zero direct OSV advisories, MIT license, and 18 direct dependencies.
- scorecard: 6.9 overall, with code review and dependency pinning both at 3 out of 10.
- github.com/jsdom/jsdom/security: Explains the default script protection and risk of enabling page code.
- github.com/jsdom/jsdom/blob/v31.0.1/.github/workflows/publish.yml: Version tags trigger automated npm publishing with identity-token permissions.
- github.com/cure53/DOMPurify: Documents older parser issues fixed in newer jsdom releases.
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
- npm downloads, 4 weeks
- 626M ×4.2 in a year
- GitHub stars
- 22k
- Commits, 12 months
- 328
- npm version
- 31.0.1 Nov 2026
- Versions, 12 months
- 17
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 6.9 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (jsdom/jsdom), npm (jsdom), OSV and the OpenSSF Scorecard.
Web scraping and HTML parsing
- 8.1Cheerio
- 7.9Puppeteer
- 7.8Crawlee
- 7.3htmlparser2
- 7.1jsdom
- 6.8Stagehand
- 6.8Readability
- 5.5Happy DOM
- 5.4LinkeDOM
- 5.2Selenium WebDriver