Free .env File Security Linter
Paste your .env and get instant findings · secrets that will ship to the browser, duplicate keys, quoting problems · plus a generated .env.example.
100% client-side · nothing you enter is ever sent to a server or stored.
Preview · sign in with a free account to run it
How to use it
- Paste the contents of a .env file.
- Read the findings, from critical to low, each with its line number and a fix.
- Copy the generated .env.example (key names with no values) to commit instead of the real file.
Example
Input
DATABASE_URL=postgres://app:pw@db.example.com:5432/app VITE_SUPABASE_URL=https://abcd1234.supabase.co VITE_STRIPE_SECRET_KEY=sk_live_51H… API_KEY=one API_KEY=two GREETING=hello world
Result
CRITICAL line 3 VITE_STRIPE_SECRET_KEY VITE_ keys are bundled into the frontend build · this one looks like a secret, so it ships to every visitor's browser. MEDIUM line 4–5 API_KEY · duplicate key (the last definition wins) MEDIUM line 6 GREETING · unquoted value contains whitespace
What the findings mean
- Secret under a public prefix
- Vite (VITE_), Next.js (NEXT_PUBLIC_) and similar frameworks copy these variables into the JavaScript every visitor downloads. A secret key there is public. Rename it, read it on the server only, and rotate it.
- Public by design
- A Supabase URL or anon key under VITE_ is fine. The linter only flags values that look like secrets.
- Duplicate key
- Different loaders pick different copies, so the app behaves differently between machines.
- Unquoted whitespace
- Many parsers cut the value at the first space. Wrap it in double quotes.
- .env.example
- The same keys with empty values, safe to commit so teammates know what to set.
Go deeper
Page updated
Frequently asked questions
Why is a secret under VITE_ or NEXT_PUBLIC_ a problem?
Those prefixes mean "bundle this into the frontend build". A VITE_STRIPE_SECRET_KEY isn't an environment variable anymore · it's public text in your JavaScript bundle, readable by every visitor. This is the single most common vibe-coding leak.
Is my .env content uploaded when I lint it?
No · all analysis runs in your browser. Nothing is transmitted or stored. For the deployed side of this check · whether your live app actually exposes env values · run a full SimplyScan.
Is my .env uploaded?
No. Linting runs in your browser and nothing is sent or stored.
Want the full picture?
This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.
Run a full security scanRelated tools
JWT Debugger
Paste a JSON Web Token to decode its header and payload · and get flagged for alg:none, weak algorithms, missing expiry, and sensitive claims.
CSP Evaluator
Paste a Content-Security-Policy and get an A-F grade · with specific fixes for unsafe-inline, unsafe-eval, wildcards, and missing directives.
Password Strength Checker
Test any password's strength · entropy, estimated crack time, and detection of common patterns and dictionary words.