Remove secrets from .env files and create a safe .env.example, entirely in your browser.
ENV Secret Sanitizer runs only in your browser: nothing you enter is stored or sent anywhere. Automatic checks can miss things, so review the results yourself.
How to use ENV Secret Sanitizer
Paste your .env content.
Press sanitize.
Copy or download the safe version.
A .env.example file tells other developers which settings a project needs, without giving away the real values. Writing one by hand makes it easy to leave a real key in by accident. This tool produces a safe version in your browser.
How it decides what to hide
Values are replaced with a placeholder when the variable name contains words such as SECRET, TOKEN, KEY, PASS, AUTH, DSN, COOKIE, SESSION, SALT or CERT, or when a URL includes a username and password. Comments, blank lines and harmless values such as PORT stay as they are. Choose the redact-all option if you want every value removed.
Check the output
Names are only a clue. A variable called CONFIG can still hold a secret, and multi-line values may not be handled fully. So read through the result before committing it, or use redact all if you aren't sure.
Good .env habits
Add .env to .gitignore before your first commit.
Commit only .env.example.
Use different keys for development and production.
If a real .env reached git, rotate the keys. Deleting the file later doesn't remove it from history.
No. The text is processed in your browser only and isn't stored or sent.
Why was a variable left unchanged?
Its name didn't match a known secret pattern. Use redact all, or edit that line yourself.
Is ENV Secret Sanitizer free?
Yes. ENV Secret Sanitizer is completely free, needs no account and has no usage limits.
Does ENV Secret Sanitizer send my data to a server?
No. Files, text, camera and microphone data are processed only in your browser. Network tests exchange only technical probes with the servers being tested.
Which devices does ENV Secret Sanitizer work on?
ENV Secret Sanitizer works in current versions of Chrome, Edge, Firefox and Safari on computers, tablets and phones. Some hardware features depend on your browser and device.