Skip to content
JS
Comparison

htmlparser2 vs cssom

Parsers and serialisersPackage data 25 Sept 2026
htmlparser2v12.0.0, 20 Mar 2026

Fast & forgiving HTML/XML parser

$ npm install htmlparser2
cssomv0.5.0, 20 Jun 2021

CSS Object Model implementation and CSS parser

$ npm install cssom
Metrichtmlparser2cssomDifference
Weekly downloads71,685,42638,490,606htmlparser2 1.9x higher
12-month download growth+75%+21%htmlparser2 +54 pts
Gzip size---
Minified size---
Dependencies40htmlparser2 4 more
Unpacked size230 kB51 kBcssom 4.5x smaller
Latest release12.0.0, 20 Mar 20260.5.0, 20 Jun 2021htmlparser2 4.7 years more recent
Releases, last 12 months30htmlparser2 3 more
First published28 Aug 201124 Oct 2011htmlparser2 57 days earlier
GitHub stars4,791757htmlparser2 6.3x higher
Open issues222cssom 20 more
Open pull requests124htmlparser2 8 more
Contributors6823htmlparser2 3.0x higher
Commits, last 52 weeks1690htmlparser2 higher
TypeScript typesBundledNoneDiffers
Module formatESM onlyCommonJSDiffers
Runtimes---
LicenseMITMITSame

Green marks the smaller size or the more recent release. Bold marks the higher count, with no judgement implied. Sizes are for the whole package per Bundlephobia. Growth compares the average of the last 4 weeks with the first 4 weeks of the 52-week series.

htmlparser271.4m latest weekcssom38.5m latest week
Week of 23 Sept 2025Week of 15 Sept 2026
Weekly npm downloads, 52 weeks. Y axis starts at zero. Values are not smoothed.

htmlparser2

Major versions
  1. 1.0.028 Aug 2011
  2. 2.0.027 Nov 2011
  3. 3.0.031 Mar 2013
  4. 4.0.02 Aug 2019
  5. 5.0.03 Oct 2020
  6. 6.0.08 Dec 2020
  7. 7.0.020 Aug 2021
  8. 8.0.023 Apr 2022
  9. 9.0.010 May 2023
  10. 10.0.024 Dec 2024
  11. 11.0.019 Mar 2026
  12. 12.0.020 Mar 2026
Last 5 releases
  1. 12.0.020 Mar 2026
  2. 11.0.019 Mar 2026
  3. 10.1.021 Jan 2026
  4. 10.0.024 Dec 2024
  5. 9.1.05 Jan 2024
80 releases in total, 3 in the last 12 months

cssom

Major versions
  1. 0.2.024 Oct 2011
Last 5 releases
  1. 0.5.020 Jun 2021
  2. 0.4.414 Nov 2019
  3. 0.4.313 Nov 2019
  4. 0.4.211 Nov 2019
  5. 0.4.14 Jul 2019
21 releases in total, 0 in the last 12 months
htmlparser2

-

cssom

-

htmlparser2

-

cssom

-

  • Need no runtime dependenciescssom (htmlparser2 has 4, cssom has 0)
  • Need both ESM and CommonJS entry pointsNeither (htmlparser2: ESM only; cssom: CommonJS)
  • Need to load it with require()cssom
  • Need TypeScript types in the package itselfhtmlparser2 (htmlparser2: Bundled; cssom: None)
  • Node.js version requirementhtmlparser2: >=20.19.0; cssom: none declared (engines field in package.json)
  • Need the more recent releasehtmlparser2 (12.0.0 on 20 Mar 2026 vs 0.5.0 on 20 Jun 2021)
  • Higher weekly npm downloadshtmlparser2 (71.7m vs 38.5m)

Each line is generated from the data above.

Indexability: Indexed: 0 US searches/month across both orderings ("htmlparser2 vs cssom", "cssom vs htmlparser2").