Skip to content
JS
Comparison

dotenv vs envalid

ConfigurationPackage data 25 Sept 2026
dotenvv18.0.3, 22 Sept 2026

Loads environment variables from .env file

$ npm install dotenv
envalidv8.2.0, 9 Jun 2026

Validation for your environment variables

$ npm install envalid
MetricdotenvenvalidDifference
Weekly downloads130,884,526493,289dotenv 265.3x higher
12-month download growth+122%+56%dotenv +65 pts
Gzip size---
Minified size---
Dependencies01envalid 1 more
Unpacked size44 kB87 kBdotenv 2.0x smaller
Latest release18.0.3, 22 Sept 20268.2.0, 9 Jun 2026dotenv 3 months more recent
Releases, last 12 months112dotenv 9 more
First published5 Jul 201329 Nov 2012envalid 7 months earlier
GitHub stars20,5431,592dotenv 12.9x higher
Open issues04envalid 4 more
Open pull requests10dotenv 1 more
Contributors120--
Commits, last 52 weeks23628dotenv 8.4x higher
TypeScript typesBundledBundledSame
Module formatCommonJSCommonJSSame
Runtimes---
LicenseBSD-2-ClauseMITDiffers

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.

dotenv130.9m latest weekenvalid493.3k 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.

dotenv

Major versions
  1. 0.0.15 Jul 2013
  2. 1.0.014 Mar 2015
  3. 2.0.021 Jan 2016
  4. 3.0.07 Jan 2017
  5. 4.0.07 Jan 2017
  6. 5.0.029 Jan 2018
  7. 6.0.02 Jun 2018
  8. 7.0.013 Mar 2019
  9. 8.0.02 May 2019
  10. 9.0.05 May 2021
  11. 10.0.021 May 2021
  12. 11.0.011 Jan 2022
  13. 12.0.014 Jan 2022
  14. 13.0.016 Jan 2022
  15. 14.0.017 Jan 2022
  16. 15.0.031 Jan 2022
  17. 16.0.02 Feb 2022
  18. 17.0.027 Jun 2025
  19. 18.0.017 Sept 2026
Last 5 releases
  1. 18.0.322 Sept 2026
  2. 18.0.221 Sept 2026
  3. 18.0.118 Sept 2026
  4. 18.0.017 Sept 2026
  5. 17.4.212 Apr 2026
104 releases in total, 11 in the last 12 months

envalid

Major versions
  1. 0.1.029 Nov 2012
  2. 1.0.023 May 2016
  3. 2.0.08 Jun 2016
  4. 3.0.021 Apr 2017
  5. 4.0.026 Aug 2017
  6. 5.0.012 Apr 2019
  7. 6.0.016 Nov 2019
  8. 7.0.030 Jan 2021
  9. 8.0.020 Sept 2023
Last 5 releases
  1. 8.2.09 Jun 2026
  2. 8.1.15 Nov 2025
  3. 8.1.012 Jul 2025
  4. 8.0.020 Sept 2023
  5. 7.3.17 Apr 2022
41 releases in total, 2 in the last 12 months
dotenv

-

envalid

-

dotenv

-

envalid

-

  • Need no runtime dependenciesdotenv (dotenv has 0, envalid has 1)
  • Module formatBoth CommonJS
  • Need TypeScript types in the package itselfBoth
  • Node.js version requirementdotenv: >=12; envalid: >=18 (engines field in package.json)
  • Need the more recent releasedotenv (18.0.3 on 22 Sept 2026 vs 8.2.0 on 9 Jun 2026)
  • Higher weekly npm downloadsdotenv (130.9m vs 493.3k)
  • Licensedotenv: BSD-2-Clause; envalid: MIT

Each line is generated from the data above.

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

Indexability: Indexed.