Free tool · no account
.env file diff and validator
Paste two environment files - .env.example and .env, or staging and production - to see which keys are missing, extra, or different, and which lines a loader or a shell will read differently than you expect. Values are masked by default and never leave the page.
Paste two .env files to compare their keys and values. Values are masked unless you choose to show them.
Runs entirely in your browser. Nothing you enter is sent to Shortspan or saved, and no account is needed.
Next step
One source instead of files to compare
Shortspan keeps environment values in named secret groups per project and injects them into a process with shortspan run, so nobody keeps a copy of the file to drift out of date.
What it checks
Keys present in one file and not the other, keys whose values differ, and keys defined twice. It also reports lines with no =, names that are not valid variable names, unclosed quotes, unquoted values containing spaces, and $ that some loaders expand as a variable.
Why .env files disagree
There is no .env standard. phpdotenv, the Node dotenv packages, Docker Compose, and source in a shell agree on simple KEY=value lines and differ at the edges: spaces around =, inline comments, multi-line values, and variable expansion. The safest file is one every loader reads the same way, which is what the warnings point you towards.
Duplicate keys are the quietest problem: some loaders keep the first value and others the last, so the same file can configure two environments differently.
Common questions
- Are my values uploaded?
- No. Both files are parsed in your browser and nothing is sent or saved. Values are masked in the results unless you choose to show them.
- Should I quote values in a .env file?
- Quote any value containing spaces,
#, or$. Single quotes keep the value literal in loaders that expand variables; double quotes allow escapes such as\nand, in some loaders, expansion. - Which value wins when a key appears twice?
- It depends on the loader, which is why the tool flags every duplicate. Remove one rather than relying on the order.
More free tools