.env File Syntax & Secret Leak Checker

.env File Syntax & Secret Leak Checker

Paste your .env file below. The checker finds duplicate keys, missing quotes, invalid variable names and accidentally exposed API keys (OpenAI, GitHub, AWS, Stripe and more) — before the file ever reaches git. 100% client-side — nothing you paste ever leaves your browser.

    .env Security Checklist

    • Never commit .env to git. Add it to .gitignore on day one. If it was ever committed, assume the keys are public — delete them from git history is not enough, you must rotate them.
    • Ship a .env.example instead. Same keys, empty or placeholder values (OPENAI_API_KEY=your-key-here). Teammates copy it to .env and fill in their own keys.
    • Rotate any key this tool flags. A leaked OpenAI, GitHub, AWS or Stripe key can be abused within minutes. Revoke it at the provider, create a new one, and update every environment that used the old one.
    • Quote values with spaces or special characters. APP_NAME=My Cool App breaks many loaders — write APP_NAME="My Cool App" instead. The same applies to values containing #, $ or `.
    • Use one key per environment. Development, staging and production should never share credentials, so a leak in one place cannot take down the others.
    • Prefer a secret manager for production. Environment variables on the server, or a vault service, beat a .env file sitting on disk — especially on shared or CI machines.

    Runs entirely in your browser. Your file is never uploaded, stored or sent anywhere. Values shown in leak warnings are masked — only the first and last few characters are displayed.