.env Linter
Paste a .env file to find plain-text secrets, duplicate keys, invalid lines, missing quotes, weak or default values and risky settings. Issues are sorted by severity.
Use the tool
Why this tool exists
A .env file is easy to get subtly wrong. A duplicate key silently overrides the first one, a space around the equals sign breaks Docker and systemd, an unquoted value with a hash is cut short, and a real API key slips into a repository. These problems show up later as odd bugs or leaks.
This linter parses the file line by line and reports errors, warnings and notes with line numbers. It flags secret-looking keys that hold real values, known key formats, default passwords such as changeme, credentials embedded in URLs, debug mode and localhost settings. The check is static and heuristic, and it runs in your browser, so the file is not uploaded. Redact real values first if you are unsure.
How to use it
- Paste the contents of your .env file into the input box.
- Run the tool to parse every line.
- Read the summary of errors, warnings and notes with their line numbers.
- Fix the issues in your file, move secrets into a secret manager and keep only an example file in git.
Frequently asked questions
What does it treat as a secret?
Keys with names like SECRET, PASSWORD, TOKEN, API_KEY or PRIVATE that have a real-looking value, and values that match known secret formats. Obvious placeholders are ignored.
Why does spacing around = matter?
Many loaders, including Docker env files, systemd and shell, do not accept spaces around the equals sign, so the value or name ends up wrong. The linter warns when it finds them.
Does it follow one specific .env spec?
It follows common conventions rather than one strict spec. Behaviour differs between dotenv libraries, for example with inline comments, so some notes tell you which loaders differ.
Is my file uploaded?
No. The linting happens in your browser. Even so, avoid pasting production secrets into any page you do not trust.