Skip to content
JS
Comparison

dotenv vs env-var

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

Loads environment variables from .env file

$ npm install dotenv
env-varv7.5.0, 20 May 2024

Verification, sanitization, and type coercion for environment variables in Node.js

$ npm install env-var
Metricdotenvenv-varDifference
Weekly downloads130,884,526618,189dotenv 211.7x higher
12-month download growth+122%+144%env-var +23 pts
Gzip size---
Minified size---
Dependencies00Same
Unpacked size44 kB42 kBenv-var 5% smaller
Latest release18.0.3, 22 Sept 20267.5.0, 20 May 2024dotenv 2.3 years more recent
Releases, last 12 months110dotenv 11 more
First published5 Jul 201315 Apr 2016dotenv 2.8 years earlier
GitHub stars20,543625dotenv 32.9x higher
Open issues06env-var 6 more
Open pull requests12env-var 1 more
Contributors120--
Commits, last 52 weeks2360dotenv 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 weekenv-var618.2k 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

env-var

Major versions
  1. 1.0.015 Apr 2016
  2. 2.0.031 Jul 2016
  3. 3.0.014 Oct 2017
  4. 4.0.09 Apr 2019
  5. 5.0.014 Jun 2019
  6. 6.0.012 Feb 2020
  7. 7.0.011 Nov 2020
Last 5 releases
  1. 7.5.020 May 2024
  2. 7.4.29 May 2024
  3. 7.4.128 Aug 2023
  4. 7.4.021 Aug 2023
  5. 7.3.124 Apr 2023
47 releases in total, 0 in the last 12 months
dotenv

-

env-var

-

dotenv

-

env-var

-

  • Need no runtime dependenciesBoth
  • Module formatBoth CommonJS
  • Need TypeScript types in the package itselfBoth
  • Node.js version requirementdotenv: >=12; env-var: >=10 (engines field in package.json)
  • Need the more recent releasedotenv (18.0.3 on 22 Sept 2026 vs 7.5.0 on 20 May 2024)
  • Higher weekly npm downloadsdotenv (130.9m vs 618.2k)
  • Licensedotenv: BSD-2-Clause; env-var: MIT

Each line is generated from the data above.

env-var: env-var npm registry, env-var npm downloads, env-var GitHub. Data fetched 25 Sept 2026.

Indexability: Indexed.