.env Validator
Validate your .env environment variable files instantly. Find syntax errors, duplicate keys, and naming convention issues with precise line numbers. 100% free and secure.
How to Validate .env Files
- Paste your .env file content in the input area, or load a sample
- Click the "Validate" button
- View validation results with detailed error messages and line numbers
- Fix any issues and re-validate
Features
- ✓Precise error location with line numbers
- ✓Duplicate key detection
- ✓SCREAMING_SNAKE_CASE convention check
- ✓Mixed quoting style warnings
- ✓Empty value and trailing whitespace detection
- ✓BOM character detection
- ✓Support for export prefix and all quoting styles
- ✓100% client-side - your secrets stay private
Frequently Asked Questions
What is a .env Validator?
A .env Validator checks if your environment variable file follows correct syntax and best practices. It identifies errors like invalid key names, unterminated quotes, and duplicate keys, showing exactly where each problem is.
What checks are performed?
The validator checks for: invalid key names, missing separators, unterminated quotes, duplicate keys, empty values, trailing whitespace, mixed quoting styles, BOM characters, and non-SCREAMING_SNAKE_CASE key naming conventions.
What is SCREAMING_SNAKE_CASE?
SCREAMING_SNAKE_CASE is the convention of using all uppercase letters with underscores between words (e.g., DATABASE_URL, API_KEY). This is the standard naming convention for environment variables across all platforms.
Is my data secure?
Absolutely. All validation happens directly in your browser - your .env data, which often contains sensitive credentials, is never sent to any server. Your environment files stay completely private and secure.
What quoting styles are supported?
The validator supports double-quoted values (with escape sequences), single-quoted values (literal strings), and unquoted values. It will warn you if you mix different quoting styles in the same file.
Does it support the export prefix?
Yes, lines starting with 'export ' (e.g., export DB_HOST=localhost) are valid and parsed correctly. The export prefix is commonly used to make .env files compatible with shell sourcing.