Skip to content
JS
Comparison

htmlparser2 vs html-react-parser

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

Fast & forgiving HTML/XML parser

$ npm install htmlparser2
html-react-parserv6.1.8, 17 Sept 2026

HTML to React parser.

$ npm install html-react-parser
Metrichtmlparser2html-react-parserDifference
Weekly downloads71,685,4262,709,725htmlparser2 26.5x higher
12-month download growth+75%+56%htmlparser2 +19 pts
Gzip size---
Minified size---
Dependencies44Same
Unpacked size230 kB480 kBhtmlparser2 2.1x smaller
Latest release12.0.0, 20 Mar 20266.1.8, 17 Sept 2026html-react-parser 6 months more recent
Releases, last 12 months322html-react-parser 19 more
First published28 Aug 201123 Aug 2016htmlparser2 5.0 years earlier
GitHub stars4,7912,429htmlparser2 2.0x higher
Open issues212html-react-parser 10 more
Open pull requests120htmlparser2 12 more
Contributors68--
Commits, last 52 weeks169541html-react-parser 3.2x higher
TypeScript typesBundledBundledSame
Module formatESM onlyESM + CommonJSDiffers
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 weekhtml-react-parser2.7m 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

html-react-parser

Major versions
  1. 0.0.123 Aug 2016
  2. 1.0.014 Dec 2020
  3. 2.0.018 Jun 2022
  4. 3.0.05 Jul 2022
  5. 4.0.031 May 2023
  6. 5.0.029 Oct 2023
  7. 6.0.02 Apr 2026
Last 5 releases
  1. 6.1.817 Sept 2026
  2. 6.1.713 Aug 2026
  3. 6.1.613 Aug 2026
  4. 6.1.517 Jul 2026
  5. 6.1.43 Jul 2026
174 releases in total, 22 in the last 12 months
htmlparser2

-

html-react-parser

-

htmlparser2

-

html-react-parser

-

  • Need both ESM and CommonJS entry pointshtml-react-parser (htmlparser2: ESM only; html-react-parser: ESM + CommonJS)
  • Need to load it with require()html-react-parser
  • Need TypeScript types in the package itselfBoth
  • Node.js version requirementhtmlparser2: >=20.19.0; html-react-parser: none declared (engines field in package.json)
  • Need the more recent releasehtml-react-parser (6.1.8 on 17 Sept 2026 vs 12.0.0 on 20 Mar 2026)
  • Higher weekly npm downloadshtmlparser2 (71.7m vs 2.7m)

Each line is generated from the data above.

Indexability: Indexed.