.env Tools
Check and clean .env files, create value-free examples and compare configuration keys.
On your device. Your input is not uploaded or saved.
How to create a .env.example file
- Choose an action: Create .env.example, Clean up or Compare keys.
- Paste your .env file, or press Load example to see how it works. Invalid lines are listed with their line numbers.
- To compare two files, paste one into File A and the other into File B to see which keys each one is missing.
- Turn on Sort keys A–Z if you want the output in alphabetical order.
- Copy the result, or press Download to save it as .env.example or .env.cleaned.
Validate a .env file
Each line must be KEY=value, a comment starting with # or a blank line. Keys are case-sensitive, use letters, digits and underscores, and cannot start with a digit. An optional export prefix, empty values, single and double quotes and quoted values that span several lines are accepted.
Lines that do not parse, unclosed quotes and backtick quoting are reported as errors, and repeated keys as warnings, each with its line number. Escape sequences, ${VAR} references and command substitutions are kept as plain text: nothing is expanded or executed. dotenv libraries treat these differently, so check your framework if a value relies on them.
Share configuration without secrets
Create .env.example writes one empty KEY= entry per unique key. Values, comments and export prefixes are never copied, so the file is ready to commit and shows teammates which variables they need to set.
Compare keys lists the keys found only in File A, only in File B and in both, for example to find what a production .env is missing compared with .env.example. Values are not compared or displayed. Clean up normalizes spacing around = and uses LF line endings, while keeping values, quotes, export prefixes, comments and duplicate keys as they are.
Limits
Each file can have up to 100,000 characters and 5,000 lines. Sorting moves comments together with their key, but if your loader expands references to earlier variables, a new order can change the loaded values.
Where does my data go?
The tool processes your .env file in this page's memory. It never uploads or saves the file, its keys or its values.
Like the rest of the site, this page uses Google Analytics and Yandex Metrica, including Metrica session replay. Tool events report only that the tool was opened or used.
The tool area is marked so that Metrica masks what you type and the results in its session recordings.
Also useful
No third-party trackers on JZR Tools. We count anonymous visits with country, referring site and device type only.