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.
| Package | Weekly downloads | 12-month change | Gzip | Dependencies | Last release | Module | Types | Runtimes |
|---|---|---|---|---|---|---|---|---|
| envalid This package | 493.3k | +56% | - | 1 | 3 months ago | CommonJS | Bundled | - |
| convict | 883.5k | +44% | - | 2 | 6 months ago | CommonJS | None | - |
| @env-spec/parser | 8.9k | - | - | 0 | 6 days ago | ESM + CommonJS | Bundled | - |
| ts-dotenv | 23.2k | +215% | - | 0 | 3 years ago | CommonJS | Bundled | - |
| env-var | 618.2k | +144% | - | 0 | 2 years ago | CommonJS | Bundled | - |
| dotenv | 130.9m | +122% | - | 0 | 2 days ago | CommonJS | Bundled | - |
| @varlock/vite-integration | 42.6k | - | - | 0 | 12 days ago | ESM only | Bundled | - |
| @varlock/nextjs-integration | 16k | - | - | 0 | 23 days ago | CommonJS | Bundled | - |
| dotenv-flow | 799.1k | +89% | - | 1 | 2 years ago | CommonJS | Bundled | - |
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)
Indexability: Indexed.