About envmask
It exists so that sharing one config line no longer means deleting a password by hand and hoping you caught them all.
What it does
Paste a config file and secrets are found by key name and value shape. The masked result is written back in the same format (.env, JSON, YAML or TOML). Compare two files and only added, removed, changed and retyped keys remain.
The last step is sharing: a keys-only .env.example, a Markdown table with a code block for a GitHub issue, or a Slack mrkdwn message.
Why it runs only in the browser
A config file is the password itself. Pasting one into an online tool sends it to someone else's server. This tool has no such path: no server code, no upload API, no account.
The page's JavaScript does everything. Open the network tab and check that no outbound request is made.
Coverage
The formats and rules below are supported. Anything outside them can be missed, so the workflow assumes you review the result.
- Formats: dotenv (.env), JSON, YAML (1.2 core), TOML, with automatic and manual selection.
- Key names: token-level match on KEY, SECRET, TOKEN, PASSWORD, PWD, CREDENTIAL, AUTH, PRIVATE, DSN, WEBHOOK, SIGNATURE, SALT, CERT, SESSION, BEARER, JWT and similar.
- Value patterns: JWT, AWS AKIA/ASIA, GitHub ghp_ and github_pat_, Slack xox* and webhooks, Discord webhooks, Stripe sk_/rk_/whsec_, OpenAI, Anthropic, Google AIza, SendGrid, Twilio, npm, GitLab, Azure AccountKey, PEM/PGP/SSH private keys, Basic/Bearer headers, database and URL credentials.
- Masking: partial, full, SHA-256 fingerprint, length preserving.
- Comparison: added, removed, changed and retyped keys by key path.
Limits
Detection is not perfect. Token formats it has not seen, or keys with meaningless names, can slip through, and public values can be masked.
YAML, TOML and JSON results are re-serialised, so comments and blank lines are normalised and YAML anchors are expanded. .env is rewritten line by line, keeping comments and order.
Back to the workbench