Skip to content
JS
Comparison

path-to-regexp vs regexparam

RoutingPackage data 25 Sept 2026
path-to-regexpv8.4.2, 1 Apr 2026

Express style path to RegExp utility

$ npm install path-to-regexp
regexparamv3.0.0, 3 Dec 2023

A tiny (399B) utility that converts route patterns into RegExp. Limited alternative to `path-to-regexp` 🙇‍

$ npm install regexparam
Metricpath-to-regexpregexparamDifference
Weekly downloads162,925,4592,966,112path-to-regexp 54.9x higher
12-month download growth+120%+172%regexparam +52 pts
Gzip size---
Minified size---
Dependencies00Same
Unpacked size58 kB14 kBregexparam 4.1x smaller
Latest release8.4.2, 1 Apr 20263.0.0, 3 Dec 2023path-to-regexp 2.3 years more recent
Releases, last 12 months40path-to-regexp 4 more
First published1 Aug 20128 Apr 2018path-to-regexp 5.7 years earlier
GitHub stars8,609599path-to-regexp 14.4x higher
Open issues45regexparam 1 more
Open pull requests85path-to-regexp 3 more
Contributors45--
Commits, last 52 weeks210path-to-regexp higher
TypeScript typesBundledBundledSame
Module formatCommonJSESM + 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.

path-to-regexp162.7m latest weekregexparam3m 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.

path-to-regexp

Major versions
  1. 0.0.11 Aug 2012
  2. 1.0.017 Aug 2014
  3. 2.0.023 Aug 2017
  4. 3.0.014 Jan 2019
  5. 4.0.012 Nov 2019
  6. 5.0.012 Nov 2019
  7. 6.0.020 Nov 2019
  8. 7.0.020 Jun 2024
  9. 8.0.01 Sept 2024
Last 5 releases
  1. 8.4.21 Apr 2026
  2. 8.4.130 Mar 2026
  3. 8.4.026 Mar 2026
  4. 0.1.1326 Mar 2026
  5. 8.3.02 Sept 2025
73 releases in total, 4 in the last 12 months

regexparam

Major versions
  1. 0.0.08 Apr 2018
  2. 1.0.09 Apr 2018
  3. 2.0.025 May 2021
  4. 3.0.03 Dec 2023
Last 5 releases
  1. 3.0.03 Dec 2023
  2. 2.0.23 Dec 2023
  3. 2.0.12 Jul 2022
  4. 2.0.025 May 2021
  5. 1.3.09 Jul 2019
15 releases in total, 0 in the last 12 months
path-to-regexp

-

regexparam

-

path-to-regexp

-

regexparam

-

  • Need no runtime dependenciesBoth
  • Need both ESM and CommonJS entry pointsregexparam (path-to-regexp: CommonJS; regexparam: ESM + CommonJS)
  • Need to load it with require()Both
  • Need TypeScript types in the package itselfBoth
  • Node.js version requirementpath-to-regexp: none declared; regexparam: >=8 (engines field in package.json)
  • Need the more recent releasepath-to-regexp (8.4.2 on 1 Apr 2026 vs 3.0.0 on 3 Dec 2023)
  • Higher weekly npm downloadspath-to-regexp (162.9m vs 3m)

Each line is generated from the data above.

regexparam: regexparam npm registry, regexparam npm downloads, regexparam GitHub. Data fetched 25 Sept 2026.

Indexability: Indexed: 0 US searches/month across both orderings ("path-to-regexp vs regexparam", "regexparam vs path-to-regexp").