The quick answer
Paste an .env file and the validator checks 4 rules line by line: every key must be UPPER_SNAKE_CASE, duplicate keys are flagged with line numbers, purely lowercase keys warn they may not load in some shells, and lines without an equals sign are reported. The output ends with a footer like "4 variables, 0 issues". Runs locally, secrets never upload.
What the validator checks, in plain terms
Paste the contents of an .env file and the checked version appears live: keys and values trimmed, comments and blank lines kept, with a validation footer appended. That footer is the point of the tool: a count of variables and issues, then one flagged line per problem, each named with its line number. A file that passes reads "4 variables, 0 issues" and ends with a single check mark; a broken one tells you which lines to fix.
The input box opens pre-filled with a five-line example (four variables, one comment, one deliberately empty variable), so the tool demonstrates itself on arrival. A size card under the output reports the character count before and after, which on the default example reads 83 → 151 chars (-82% saved): the footer adds 68 characters, so a negative figure there is expected.
Working with the ENV File Validator
The workflow is paste, read the footer, copy. Three steps, and the box is already loaded with the example when you arrive.
Paste your .env contents
Paste the file, comments and blank lines included, over the pre-filled example. The checked file and its footer re-render on every keystroke, and there is no button to press in between.
Read the footer first
The summary line reports N variables and M issues; when M is above zero, each issue is listed below it with its line number, ready to paste into a ticket. The normalized file sits above the footer, unchanged except for trimmed whitespace.
Copy the result
Copy puts the whole output, file plus footer, on your clipboard. Because the report rides along as comments, the evidence travels with the file into tickets, pull requests and commit messages.
The four checks, line by line
Four checks run against every non-comment line. A line with no equals sign is reported as: no "=" found. A key that is not UPPER_SNAKE_CASE, meaning the required pattern is an uppercase letter or underscore, then uppercase letters, digits and underscores, is reported as: key "your-key" should be UPPER_SNAKE_CASE. A purely lowercase key additionally warns that it may not load in some shells. And a key that appeared earlier in the file is reported as a duplicate, with the second line's number in the message.
The output keeps your file intact above a # --- validation --- marker: the same lines, normalized to key=value, followed by a summary comment ("N variables, M issues") and one comment line per issue, or "All checks passed" when M is 0. One line can collect two issues: a key like database fails the naming rule and draws the lowercase warning on top of it.
The ENV File Validator in action: examples you can check
The example below is the built-in sample, five lines with one comment and one deliberately empty variable, run through the real validator: 4 variables, 0 issues, every check passed.
Input
DATABASE_URL=postgres://localhost/app PORT=8080 # comment EMPTY_VAR= VALID_NAME=yes
Output
DATABASE_URL=postgres://localhost/app PORT=8080 # comment EMPTY_VAR= VALID_NAME=yes # --- validation --- # 4 variables, 0 issues # ✓ All checks passed
A second paste worth trying: rename DATABASE_URL to database_url and add a second PORT line at the bottom. The footer flips to 2 issues and names exactly two: the naming violation on line 1 and the duplicate on line 6, each with its line number, while the file above stays intact. Rename it to plain database instead and that one line collects both the naming violation and the lowercase warning.
Who pastes an .env here, and what they catch
An .env file is where production credentials live, which is exactly why it should never be pasted into a server-side linter. The people using this page are checking shape, not secrets, and getting the answer without the upload.
Backend developers paste the file that boots locally and dies in staging, and the reason is often a lowercase key the local shell tolerated but the deployment one ignored. DevOps engineers keep it as a pre-deploy checklist item: paste the rendered .env, see 0 issues, continue, and when the report shows line 47 has no equals sign, that is a two-minute fix instead of a pod crash-looping at 2 a.m. Security-minded reviewers hunt duplicate keys, the quiet killer: the second DATABASE_URL wins at load time, and if it points at a test database nobody notices until data lands in the wrong place. QA engineers check test environments whose silently missing variables produce flaky suites rather than failures, with the network cable unplugged.
What the page promises
| Aspect | This tool |
|---|---|
| Processing | 100% client-side (JavaScript in your browser) |
| Signup required | No; no account, no email |
| Data uploaded | Never; inputs stay on your device by architecture |
| Speed | Instant, live recomputation on every keystroke |
| Mobile support | Full; responsive two-panel layout |
| Offline use | Works after first load; the checks need no network |
| Cost | Free |
| Documentation | Method, worked examples and FAQ on this page |
What the ENV File Validator cannot do
The engine is a line-by-line checker, not a dotenv parser: it splits on the first equals sign, trims both sides, and checks the key's shape. These are the documented boundaries.
- Multi-line values are not joined: a quoted value spanning lines is treated as separate lines, and each continuation line is flagged for its missing equals sign; keep values on one line or pre-join them.
- export KEY=value lines are flagged, because the export prefix breaks the key pattern; dotenv tolerates the form in some parsers, but the plain KEY=value form is the portable one.
- Variable expansion is not resolved: ${VAR} references pass through as literal text; the check is syntactic shape, not interpolation semantics.
- Value contents are never judged: quotes, commas and secrets inside a value are copied through as-is, which is correct for dotenv and means the tool says nothing about what a value contains.
Every limit has the same root: the validator reads shape, not semantics. It knows what a well-formed .env line looks like and says nothing about what your application does with the values, and that boundary keeps the tool exact, deterministic and fast.
Your secrets stay in the browser
The privacy model is structural: the checks are plain JavaScript running in the tab, with no on-demand libraries and no network involvement at all. Configs holding credentials, API keys and connection strings are exactly the material that should never cross an unnecessary network boundary, and here they never do; even a very large file stays local, because there is no size quota when there is no server.
You can verify the claim yourself: open the page, open the browser's network inspector, and paste your longest .env. The request list stays empty while the footer updates, which is harder to argue with than any policy page.
Linters, CI checks and this page
| Alternative | Why people pick ENV File Validator instead |
|---|---|
| Server-side validators | Identical checks without uploading customer data or credentials to a third party, and no file size quota |
| jq, awk and command-line tools | Zero install and no shell escaping to get right; the command line still wins for scripted pipelines |
| IDE plugins | Works in any browser on any machine, including the locked-down laptop in the meeting room |
The comparison names the lanes where dedicated tooling stays ahead: scripted CI checks and schema-driven completeness. For the quick shape check before a push, one paste here is the whole job.
Playbook for clean .env files
- Bookmark the page: repeat users save real time when the check is one keystroke away.
- Run the built-in example first on any unfamiliar day: a known input with a known output validates your understanding in ten seconds before you paste real credentials.
- Chain tools when a workflow needs more than one step: the related-tools links below are ordered by what people typically combine.
When a result behaves unexpectedly, the causes are almost always one of these:
- A line flagged for no "=" is usually a wrapped value or a comment that lost its #; rejoin the line or restore the comment marker.
- Every key flagged as not UPPER_SNAKE_CASE: check for an export prefix, hyphens or camelCase keys inherited from another system; rename once and the warning disappears.
- The duplicate report points at the second occurrence; the first definition is the one earlier in the file. Decide which wins, delete the other, and re-run.
If something misfires, send the details via the contact page; reports get read by the team that builds the tool.
Frequently asked questions
These are the questions people actually search about .env validation, answered directly. If yours is missing, the contact page takes requests.
Do you store what I enter into the ENV File Validator?
No. The dotenv validation runs locally in your browser. Nothing you enter becomes a network request, nothing is stored server-side, and closing the tab erases the session entirely.
Does the ENV File Validator work on mobile?
Yes. The layout stacks the input box above the output on a phone screen and runs them side by side on a desktop, with recomputation as you type. It runs in iOS Safari, Android Chrome and every current desktop browser, with no app install.
Does it check that every variable my app needs is present?
No. The validator checks the file's internal consistency (naming, duplicates, syntax), not completeness against a schema. Cross-checking against your app's required variables is a different job: dotenv-safe and zod-based schemas do it in CI, while this page catches the shape problems before the file ever reaches CI.
What exactly counts as UPPER_SNAKE_CASE?
Uppercase letters, digits and underscores, starting with a letter or underscore: DATABASE_URL, EMPTY_VAR and _PRIVATE all pass; database_url, db-url and db url are all flagged. A purely lowercase key like port collects a second warning that some shells will not load it. The check is a fixed pattern, applied identically every run.
Is the ENV File Validator free to use?
Yes, free with no signup, no email capture and no usage limit. ENV File Validator runs entirely in your browser, so each extra use costs this site nothing and costs you nothing either. Use it once a year or fifty times a day; the answer is the same.
Are the files I validate in ENV File Validator uploaded anywhere?
No. All parsing and checking happen client-side in JavaScript; nothing reaches any server, and the page even works offline once loaded. ENV File Validator keeps the entire dotenv validation pipeline in the tab.
Does the validator unquote my values?
No. Quotes pass through untouched, which matches dotenv semantics: KEY="value" loads with the quotes treated by the dotenv parser itself. The tool trims whitespace around the key and the equals sign only; the value side is copied as-is, characters included.
Tools that pair well with env work
These config-file tools share the ENV File Validator's workflow most often; the internal links exist because people genuinely chain them, not for keyword decoration.
- YAML Validator: the same shape-first check for YAML configs, with error line numbers.
- INI File Formatter: aligns keys and values in .ini files the way this page normalizes .env lines.
- TOML Formatter: pretty-prints TOML configs, the third format in most environment stacks.
- JSON Formatter & Validator: for the config files that arrive as JSON instead.
Sources and further reading
The 12-factor methodology is why .env files exist at all: config belongs in the environment, not the code. dotenv and direnv are the two loaders that define what a well-formed file means in practice, and this page checks that shape while the loaders enforce it at runtime.
Sources and further reading
- dotenv: the original .env loader for Node(github.com)
- The 12-factor app: config(12factor.net)
- direnv: environment switcher per directory(direnv.net)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.