.env Validator
Check a .env file for invalid keys, duplicates, spaces around =, unclosed quotes and other dotenv syntax problems - values are never shown.
Paste a .env or .env.example file to find syntax problems by line number - the report never displays values, and the check runs in your browser.
Checked entirely in your browser. The report shows key names and line numbers only - values are never displayed, stored or sent. Even so, prefer pasting .env.example rather than a file with live secrets.
More Developer Documentation / Project Tools
View all 11Prefer validating .env.example over a file with live production secrets.
What Is the .env Validator?
It checks the syntax of a .env or .env.example file line by line and reports problems with the line number and key name. Values are never shown in the report, and nothing leaves your browser.
Why It Matters
Dotenv files look simple, but loaders disagree on the details. A space around = works in one library and breaks Docker's --env-file; an unquoted # silently cuts a value short; a duplicate key means the value you see is not the value your app gets. These mistakes rarely produce a clear error - the app just behaves strangely.
How to Use It
- Paste the file (preferably the
.env.exampleversion) or click Load sample. - Choose which optional checks to run.
- Click Validate and fix the errors first, then review the warnings.
What It Checks
- Errors: lines without
=, invalid key names (must be letters, digits and underscores, not starting with a digit), spaces around=, duplicate keys, unclosed quotes. - Warnings: lowercase keys, unquoted values with spaces or
#, text after a closing quote, trailing whitespace, theexportprefix, multi-line values, CRLF line endings, a byte-order mark, and${VAR}references to variables not defined in the file. - Empty values: listed separately - normal in an example file, worth checking in a real one.
Limitations
The validator checks syntax, not meaning: it cannot tell whether a database password is correct or a URL is reachable. Parsers differ, so a warning means "may behave differently between tools", not always "broken". Avoid pasting live production secrets into any website, including this one. To start a fresh file, use the .env Generator; to convert variables between formats, use the Environment Variable Formatter.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.