Valid .env Example: Config File That Passes Validation
Check a .env file for KEY=VALUE rows, duplicate keys, and quotes that open and do not close.
🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.
The result appears on this page after you run the tool. Nothing you enter is uploaded.
Result
About this tool
This page opens the ENV validator preloaded with a small, realistic `.env` file: `NODE_ENV`, `PORT`, a `DATABASE_URL` connection string, an `API_KEY` placeholder, and a `DEBUG` flag. Every key follows the standard uppercase-with-underscores naming convention, every line uses plain `KEY=VALUE` syntax, and there isn't a duplicate or an unbalanced quote in sight — the validator confirms it passes the instant the page loads.
These five variables cover the shape of a typical backend config file: an environment name that switches app behavior, a port to bind to, a database connection string, a secret credential, and a boolean toggle. It's a reasonable starting template to sanity-check your own `.env` layout against before you paste in anything that actually contains real secrets.
Edit the sample directly in the box below — add a key with a space in it, wrap a value in quotes and forget to close them, or duplicate one of the lines — to see the validator's status flip from valid to invalid with the exact line called out.
Example. FOO=bar and BAR=baz pass with .env configuration syntax is valid! A second FOO=bar fails with Duplicate environment key: "FOO". export FOO=bar fails because the key is read as export FOO.
Limit. The scan does not strip export, does not expand variables, and does not join continued lines. A quote is only checked as a matching pair at the two ends of the value.