.env File Sanitizer & Secret Redactor

.env File Sanitizer & Secret Redactor

100% private, redacted on your device. Nothing you paste here is ever sent over the network - this tool makes no network requests with your config, ever.

Why Redact a .env File Before Sharing?

Bug reports and support requests often ask for a config file to reproduce an issue - but a real .env file usually contains live database passwords, API keys, and signing secrets. Pasting it as-is into a GitHub issue, a support ticket, or a chat message can leak working credentials, even if you delete the message later (many platforms cache or index content instantly). This tool replaces each secret-looking value with an obvious placeholder like YOUR_DATABASE_PASSWORD_HERE, so the file's structure stays intact for debugging while the actual secrets never leave your machine in the first place.

It also catches a case people often miss: a connection-string URL like postgres://user:hunter2@db.example.com/mydb embeds a real password even when the variable name itself (DATABASE_URL) doesn't look secret - this tool redacts just the embedded credential, not the whole URL.

How Redaction Decisions Are Made

Key-Name HeuristicsAny key containing "key", "secret", "password", "token", "auth", "credential", and similar substrings is redacted automatically.
Embedded URL CredentialsA user:password@host pattern inside any connection-string value is redacted, regardless of what the variable is named.
Comments Left UntouchedLines starting with # pass through unchanged, so your file's structure and notes stay readable.
Two Redaction StylesChoose a readable placeholder (YOUR_KEY_HERE) or same-length asterisks, depending on what your bug report needs.

Frequently Asked Questions

Does this tool send my .env file or secrets anywhere?

No - every line is scanned and redacted entirely in your browser using plain JavaScript. This page makes no network requests containing anything you paste, ever.

How does it decide which variables are "secret"?

It checks whether the variable's name contains a common secret-related substring (key, secret, password, token, auth, credential, and similar), and separately checks every value for an embedded user:password@ pattern inside a connection-string URL, regardless of the variable's name.

Will it catch every possible secret?

No tool can guarantee 100% detection of arbitrarily-named secrets - a value stored under an unusual key name with no URL structure could be missed. Always do a final visual scan before sharing, and use "Redact every value" mode if you want to be maximally cautious.

What happens to comments and non-KEY=VALUE lines?

They pass through completely unchanged - only lines matching KEY=VALUE syntax are ever considered for redaction, so blank lines, comments, and section headers keep your file's original structure and formatting.