A laptop, a phone and a hand writing in a notebook on a wooden desk, banner image on the Env Config Checker page

Tools / Build suite

Env Config Checker

Audit a .env file for parse problems, duplicate keys, quoting mistakes, live secrets and production risks, and compare it with your .env.example.

Paste the file and read the findings. Each finding has a severity, a line number and the key name, and never shows a value. Add your .env.example to see missing and extra keys, and generate a keys-only .env.example from the file you pasted.

Open the toolWhat is insideWhat it cannot do
Screenshot of the Env Config Checker tool

What is inside

What is inside the tool.

A real .env parser

Quoted values, inline comments after a space and #, an export prefix, multi-line quoted values, \n and \r escapes in double quotes and CRLF are read the way python-dotenv 1.0.1 and Node dotenv 16.4.5 agree on. Where those two loaders differ, the tool says so in the finding instead of picking one.

Findings with line numbers

Errors, warnings and notes are sorted by severity and show the line and the key. Values never appear in findings, the report or the generated example.

Quoting and syntax

Unquoted values with spaces, an opening quote that never closes, text after a closing quote, spaces around =, invalid key names, lines with no =, a byte order mark, mixed line endings, invisible characters and a missing final newline.

Duplicates and references

A repeated key is reported with the line of the first one. A ${NAME} or $NAME reference to a key that is defined later, or not at all, is flagged. Single-quoted values are not expanded, so they are skipped.

Secrets and production risks

Live key patterns (sk_live, rk_live, AWS access key IDs, GitHub tokens, Slack tokens, private key blocks), placeholder values, passwords inside URLs, a test-mode key, production with debug on, and localhost URLs in a production file.

Compare with .env.example

Missing keys are errors. Keys that are not in the example and keys that are empty in .env but listed in the example are warnings.

Report and example

Copy or download a plain-text report. Generate a .env.example from your file: keys only, every value empty.

Worked example

One line, three readings.

You writeWhat the tool saysWhy
GREETING="hello # not a comment" # noteKeeps the quoted text, notes the inline commentThe # inside quotes belongs to the value. The one after the closing quote is a comment.
APP_NAME = My AppWarnings: spaces around =, spaces in an unquoted value.python-dotenv and Node dotenv accept both and keep the whole value. Other tools may not. Quote it to be safe.
BASE=${HOST}/apiWarning if HOST is defined later or not in the filepython-dotenv expands in file order and Node dotenv does not expand at all.

How to use it

Four steps.

Step 1

Paste your .env. Findings update as you type.

Step 2

Paste your .env.example under it if you have one, to see missing and extra keys.

Step 3

Fix errors first, then warnings. Notes are for loaders that differ from each other.

Step 4

Copy the report for a pull request, or generate a .env.example with empty values.

What it cannot do

Limits.

Two loaders checked, not all

Parsing was compared with python-dotenv 1.0.1 and Node dotenv 16.4.5 on 1,520 test inputs. Where both agree, the tool agrees. Other loaders, shells and platforms may differ, and the findings only describe those two loaders.

Secret patterns are a short list

It matches a few well-known prefixes. A secret with no known prefix is not detected. A clean report is not a security review. The report prints no parsed values. Key names that are plain names are shown, so a secret pasted as a key name could appear. Do not paste a secret as a key name.

It cannot see your environment

A reference to a key that is not in the file is reported. It may be set by your host, and the tool cannot tell.

No auto-fix

It reports and generates an example. It does not rewrite your file.

What it does

What Env Config Checker does.

Free .env file checker in your browser: parse and quoting problems, duplicate keys, live secret patterns, production risks, undefined ${VAR} references and a comparison with .env.example. Findings never show values.

FunctionWhat it does
Where it runsIn a browser tab, no install
Duplicated keyYes
Invisible characterYes
Substitution keyYes (undefined or later-defined references)
Compare two filesKeys missing, extra or empty against .env.example

Common mistakes

Each of these produces a finding.

An unquoted value with spaces

APP_NAME=My App is kept whole by python-dotenv and Node dotenv and quoting it removes any doubt about other tools. Quote it: APP_NAME="My App".

A quote that never closes

python-dotenv drops the line and Node dotenv keeps the quote as text, so the two loaders give different results. The tool points at the opening line.

A # in an unquoted value

A value such as abc #1 ends at the space before # in both checked loaders. A # with no space before it is kept by python-dotenv and ends the value in Node dotenv. Quote values that contain #.

Duplicate keys

Both checked loaders keep the last DATABASE_URL. A loader that keeps the first would differ. The tool reports the line of the first one.

A real key in a committed file

Live key patterns are reported as errors. If the file was shared or committed, rotate the key.

Production with debug on

NODE_ENV=production and DEBUG=true together is an error, because verbose errors can leak internals.

Questions

Before you ask.

Is my file uploaded?

No. Parsing runs in your browser tab.

Why are values never shown?

So you can paste findings into a ticket without leaking a secret. The report and the generated example have no values.

Why is a # kept in one value and cut in another?

Inside quotes it is part of the value. In an unquoted value, a # after a space starts a comment in both checked loaders.

Which loader rules does it use?

Where python-dotenv 1.0.1 and Node dotenv 16.4.5 agree, the tool follows them. Where they differ, the finding names both behaviors.

Does it fix the file?

No. It reports, and it can generate a keys-only .env.example.

What does it cost?

Nothing. No account.

Your data

What stays on your device.

The tool runs in this browser tab. Your file stays in the page. Findings, the report and the generated example list line numbers and key names, never values. Nothing is copied, downloaded or shared unless you press Copy or Download.

Keep going

Other tools you may want next.

Sources

Where the facts come from.

Try it

Check the file before it ships

Open Env Config Checker
A laptop, headphones, a camera, a phone and a plant on a white desk, seen from above, banner image on the Env Config Checker page

Try it now.

Env Config Checker runs in your browser. No account needed.

Input To Output

Two boxes in, a findings list out

Your .envYour.env.example6 errors, 14warnings, 2notes on thesampleSorted byseverity, thenby lineEnv ConfigCheckerInOut
InYour .envYour .env.exampleEnv ConfigChecker6 errors, 14 warnings, 2 notes onthe sampleSorted by severity, then by lineOut
The sample file trips the lot.

Pipeline

How a line is read

Byte order markand line endingscheckedKey and valuesplit at the first=Quotes, commentsand $ referencesresolvedFindings rankederror, warning,note
Byte order mark and line endingscheckedKey and value split at the first =Quotes, comments and $ referencesresolvedFindings ranked error, warning,note
Before any check runs.

Bar Compare

The sample file, by severity

Errors6 findingsWarnings14 findingsNotes2 findings
Errors6 findingsWarnings14 findingsNotes2 findings
Real output of the built-in sample.

Before After

Secrets it catches

ValueFindingAPI_KEY=sk-live-...PASSWORD=passworda URL with user:pass@host-----BEGIN PRIVATE KEY-----looks like a live secret:rotate ita placeholder value: errora URL with a password in it:warningholds a private key: error
Value to FindingAPI_KEY=sk-live-...looks like a live secret: rotate itPASSWORD=passworda placeholder value: errora URL with user:pass@hosta URL with a password in it: warning-----BEGIN PRIVATE KEY-----holds a private key: error
Values are pattern-checked.

Before After

Key hygiene

LineFindingDATABASE_URL on lines 3 and9EMPTY_SECRET=APP_NAME = My Appduplicate key: the lastvalue winsempty: intentional orforgotten?spaces around =, and spacesin an unquoted value
Line to FindingDATABASE_URL on lines 3 and 9duplicate key: the last value winsEMPTY_SECRET=empty: intentional or forgotten?APP_NAME = My Appspaces around =, and spaces in anunquoted value
From the sample file.

Before After

Dollar references

LineFindingBASE=${HOST}/apia $ reference inside singlequotesHOST is not defined here:python-dotenv reads theenvironment, Node dotenvdoes not expand itpython-dotenv still expandsit; Node dotenv keeps it astext
Line to FindingBASE=${HOST}/apiHOST is not defined here: python-dotenv readsthe environment, Node dotenv does not expandita $ reference inside single quotespython-dotenv still expands it; Nodedotenv keeps it as text
The loaders disagree.

Support Matrix

The checks, by where they look

SyntaxNamingSecretsReferencesCompare withexampleFileLineKeyValueAcross keys
FileSyntaxLineSyntaxNamingKeyNamingValueSecretsReferencesAcross keysNamingReferencesCompare with example
Every row is a different pass.

Before After

Production crossed wires

CombinationFindingNODE_ENV=production withDEBUG=trueproduction with a localhostURLerror: verbose errors canleak internalswarning: production filepoints at localhost
Combination to FindingNODE_ENV=production with DEBUG=trueerror: verbose errors can leakinternalsproduction with a localhost URLwarning: production file points atlocalhost
Both trip on the sample.

Before After

Compared with the example file

KeysFindingREDIS_URL and SENTRY_DSNDEBUG, PASSWORD and 6 moremissing from .env: an erroreachnot in .env.example: awarning each
Keys to FindingREDIS_URL and SENTRY_DSNmissing from .env: an error eachDEBUG, PASSWORD and 6 morenot in .env.example: a warning each
The second box earns its keep.

Before After

The generated example file

InOut11 unique keys in the samplevalues stripped, keys kept11 KEY= lines outunusual keys left out, witha note
In to Out11 unique keys in the sample11 KEY= lines outvalues stripped, keys keptunusual keys left out, with a note
One click from a run.

Input To Output

Take the findings with you

A finished runCopy ordownload thereportCopy ordownload the.env.exampleEnv ConfigCheckerInOut
InA finished runEnv ConfigCheckerCopy or download the reportCopy or download the .env.exampleOut
Two artifacts per run.

Pipeline

The loop

Paste both filesFindings update asyou typeFix a line andwatch the countdropGenerate a cleanexample file
Paste both filesFindings update as you typeFix a line and watch the countdropGenerate a clean example file
No run button needed.

Before After

Where loaders disagree

LineFindingan export prefixan opening quote with noclosing quotepython-dotenv and Nodedotenv accept it; otherloaders may notpython-dotenv drops theline; Node dotenv keeps thequote as text
Line to Findingan export prefixpython-dotenv and Node dotenv acceptit; other loaders may notan opening quote with no closingquotepython-dotenv drops the line; Nodedotenv keeps the quote as text
The findings name both sides.

Before After

Sort order

SeverityPlaceErrorsWarningsNotesfirst, by line numbernext, by line numberlast, by line number
Severity to PlaceErrorsfirst, by line numberWarningsnext, by line numberNoteslast, by line number
Deterministic, top to bottom.

Before After

Hidden trouble

CharacterFindingA byte order markMixed CRLF and LF endingsA zero-width spacesome loaders read it intothe first keywarned, not silentlyacceptedcan hide inside a key orvalue
Character to FindingA byte order marksome loaders read it into the firstkeyMixed CRLF and LF endingswarned, not silently acceptedA zero-width spacecan hide inside a key or value
Invisible on screen.

Before After

Quoting rules

TextReading"hello # not a comment"a # after a closing quotethe # stays inside thequoted valuean inline comment: noted,not an error
Text to Reading"hello # not a comment"the # stays inside the quoted valuea # after a closing quotean inline comment: noted, not anerror
A # is not always a comment.

Input To Output

Nothing leaves the page

A file withlive keysChecked inyour browserNothing isuploadedEnv ConfigCheckerInOut
InA file with live keysEnv ConfigCheckerChecked in your browserNothing is uploadedOut
Safe for real secrets.

Authored Tiles

The sample, counted

22 findings on the sample11 unique keys2 missing from .env6 live-secret patterns
22 findings on the sample11 unique keys2 missing from .env6 live-secret patterns
Real output, not a promise.