Check a .env file before it breaks your app or leaks a secret. Paste it or drop the file and get every syntax error, duplicate key and quoting problem with its line number, plus a warning for values that look like real credentials — API keys, tokens, passwords, database URLs. A .env.example with the values stripped is generated for you to commit instead. It's free, runs in your browser, and your secrets never leave your device.
| Line | Problem |
|---|---|
| KEY = value | Spaces around = — some loaders keep them |
| MSG=hello world | Unquoted spaces — quote the value |
| PASS=abc#123 | # after a space starts a comment |
| 2FA_KEY=x | Keys can't start with a digit |
| KEY="unterminated | Missing closing quote |
Usually an unquoted value with spaces or a # in it. Wrap the value in double quotes.
Most loaders silently use the last one. The validator shows both lines so you can pick.
No. Add .env to .gitignore and commit .env.example with the values removed.
By known key formats (AWS, Stripe, GitHub, Slack, JWTs, private keys) and by key names like SECRET, TOKEN or PASSWORD with real-looking values.
No. It's checked entirely in your browser.
The validator follows the dotenv conventions most loaders share. Comments and blank lines are skipped, a leading export is allowed, and each remaining line must be KEY=value with a key of letters, digits and underscores that doesn't start with a digit; keys with dots or hyphens are flagged because shells can't export them. Values may be unquoted, or wrapped in single, double or backtick quotes; double-quoted values can span lines, unterminated quotes and text after a closing quote are errors, and an unquoted value containing spaces is a warning because shells and some loaders cut it short. Inline comments after an unquoted value are stripped as dotenv does. Duplicate keys are reported with the line of the first definition, since the later one usually wins silently. Values are checked for well-known credential formats — AWS access keys, Stripe live keys, GitHub, Slack, Google and AI-provider tokens, private keys, JWTs and URLs with embedded passwords — and keys named like secrets with non-placeholder values are flagged, as are long high-entropy strings. A .env.example is produced with every value removed and comments kept.