Skip to content
JS
Alternatives

envalid alternatives

8 packages that do the same job as envalid: convict, @env-spec/parser, ts-dotenv, env-var, dotenv, @varlock/vite-integration, @varlock/nextjs-integration, dotenv-flow. Figures below are from npm, GitHub and Bundlephobia.

Data as of 25 Sept 2026
PackageWeekly downloads12-month changeGzipDependenciesLast releaseModuleTypesRuntimes
envalid
This package
493.3k+56%-13 months agoCommonJSBundled-
convict883.5k+44%-26 months agoCommonJSNone-
@env-spec/parser8.9k--06 days agoESM + CommonJSBundled-
ts-dotenv23.2k+215%-03 years agoCommonJSBundled-
env-var618.2k+144%-02 years agoCommonJSBundled-
dotenv130.9m+122%-02 days agoCommonJSBundled-
@varlock/vite-integration42.6k--012 days agoESM onlyBundled-
@varlock/nextjs-integration16k--023 days agoCommonJSBundled-
dotenv-flow799.1k+89%-12 years agoCommonJSBundled-

12-month change compares the average of the last 4 weeks of downloads with the first 4 weeks of the 52-week series. Gzip size is for the whole package (Bundlephobia). Runtimes are taken from each package's own documentation; "-" means not recorded.

Featureful configuration management library for Node.js (nested structure, schema validation, etc.)

Compared with envalid

  • 1.8x more weekly downloads (883.5k vs 493.3k)
  • 2 dependencies vs 1
  • No types vs bundled types
  • Declares Node.js >=6 vs Node.js >=18
  • Last release 19 Mar 2026 vs 9 Jun 2026
  • 1.5x more GitHub stars (2.4k vs 1.6k)

Parser for @env-spec enabled dotenv files

Compared with envalid

  • 55x fewer weekly downloads (8.9k vs 493.3k)
  • 0 dependencies vs 1
  • ESM + CommonJS vs CommonJS
  • Declares Node.js >=22 vs Node.js >=18
  • Last release 18 Sept 2026 vs 9 Jun 2026
  • 2.9x more GitHub stars (4.6k vs 1.6k)

Strongly-typed environment variables from .env & process.env

Compared with envalid

  • 21x fewer weekly downloads (23.2k vs 493.3k)
  • 0 dependencies vs 1
  • Declares no Node.js engine range vs Node.js >=18
  • Last release 5 Feb 2023 vs 9 Jun 2026
  • 36x fewer GitHub stars (44 vs 1.6k)

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

Compared with envalid

  • 1.3x more weekly downloads (618.2k vs 493.3k)
  • 0 dependencies vs 1
  • Declares Node.js >=10 vs Node.js >=18
  • Last release 20 May 2024 vs 9 Jun 2026
  • 2.5x fewer GitHub stars (625 vs 1.6k)

Loads environment variables from .env file

Compared with envalid

  • 265x more weekly downloads (130.9m vs 493.3k)
  • 0 dependencies vs 1
  • Declares Node.js >=12 vs Node.js >=18
  • Last release 22 Sept 2026 vs 9 Jun 2026
  • 13x more GitHub stars (20.5k vs 1.6k)

Vite plugin to use varlock for .env file loading - adds validation, type-safety, and extra security features

Compared with envalid

  • 12x fewer weekly downloads (42.6k vs 493.3k)
  • 0 dependencies vs 1
  • ESM only vs CommonJS
  • Declares Node.js >=22 vs Node.js >=18
  • Last release 12 Sept 2026 vs 9 Jun 2026
  • 2.9x more GitHub stars (4.6k vs 1.6k)

drop-in replacement for @next/env that uses varlock to load .env files with validation and extra security features

Compared with envalid

  • 31x fewer weekly downloads (16k vs 493.3k)
  • 0 dependencies vs 1
  • Declares Node.js >=22 vs Node.js >=18
  • Last release 1 Sept 2026 vs 9 Jun 2026
  • 2.9x more GitHub stars (4.6k vs 1.6k)

Loads environment variables from `.env.[development|test|production][.local]` files

Compared with envalid

  • 1.6x more weekly downloads (799.1k vs 493.3k)
  • Declares Node.js >= 12.0.0 vs Node.js >=18
  • Last release 26 Dec 2023 vs 9 Jun 2026
  • 1.8x fewer GitHub stars (902 vs 1.6k)
Sources: npm registry, npm downloads API, GitHub API, Bundlephobia. Data fetched 25 Sept 2026.

Indexability: Indexed.