Skip to content
JS
Comparison

env-var vs envalid

ConfigurationPackage data 25 Sept 2026
env-varv7.5.0, 20 May 2024

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

$ npm install env-var
envalidv8.2.0, 9 Jun 2026

Validation for your environment variables

$ npm install envalid
Metricenv-varenvalidDifference
Weekly downloads618,189493,289env-var +25%
12-month download growth+144%+56%env-var +88 pts
Gzip size---
Minified size---
Dependencies01envalid 1 more
Unpacked size42 kB87 kBenv-var 2.1x smaller
Latest release7.5.0, 20 May 20248.2.0, 9 Jun 2026envalid 2.1 years more recent
Releases, last 12 months02envalid 2 more
First published15 Apr 201629 Nov 2012envalid 3.4 years earlier
GitHub stars6251,592envalid 2.5x higher
Open issues64env-var 2 more
Open pull requests20env-var 2 more
Contributors---
Commits, last 52 weeks028envalid higher
TypeScript typesBundledBundledSame
Module formatCommonJSCommonJSSame
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.

env-var618.2k 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.

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

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
env-var

-

envalid

-

env-var

-

envalid

-

  • Need no runtime dependenciesenv-var (env-var has 0, envalid has 1)
  • Module formatBoth CommonJS
  • Need TypeScript types in the package itselfBoth
  • Node.js version requirementenv-var: >=10; envalid: >=18 (engines field in package.json)
  • Need the more recent releaseenvalid (8.2.0 on 9 Jun 2026 vs 7.5.0 on 20 May 2024)
  • Higher weekly npm downloadsenv-var (618.2k vs 493.3k)

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.
envalid: envalid npm registry, envalid npm downloads, envalid GitHub. Data fetched 25 Sept 2026.

Indexability: Indexed.