Microdeck.tools 100% In-Browser

.env Diff, Formatter & Secret Sanitizer

New

Audit `.env` files across development, staging, and production without exposing API tokens to third-party diff servers. Diff keys and changed values, normalize quotes and key order, and strip sensitive credential values into safe commit-ready `.env.example` templates.

100% In-Browser No Server Storage Instant Results
Left .env (Base / Production)
Right .env (Target / Staging)
+1 Added-1 Missing in Right~5 Value Changed=0 Identical
KeyStatusLeft ValueRight Value
SENTRY_DSNadded—https://abc123@o0.ingest.sentry.io/456
REDIS_HOSTremoved10.0.4.12—
APP_ENVchangedproductionstaging
PORTchanged30008080
DATABASE_URLchangedpostgres://user:supersecret@db.internal:5432/apppostgres://user:stagingpw@db.staging:5432/app
STRIPE_SECRET_KEYchangedsk_live_51MockSecretKey12345sk_test_51MockStagingKey99999
FEATURE_NEW_CHECKOUTchangedfalsetrue

Did this tool save you time? Help keep Microdeck free and maintained. Completely optional · From $3.

How It Works Under the Hood

The parser scans `KEY=VALUE` lines (supporting `export ` prefixes, quoted values, inline comments, and multi-line whitespace stripping) into key-indexed maps in memory, diffs missing/added/changed keys between left and right snapshots, and masks sensitive keys using pattern-based redaction.

Step-by-Step Instructions

1

Choose between Compare Two .env Files, Scrub Secrets -> .env.example, or Sort & Format .env.

2

Paste your `.env` configurations into the editor; no network call or storage persistence occurs.

3

Inspect added (`+`), removed (`-`), and value-changed (`~`) environment variables row by row.

4

Copy or download the sanitized `.env.example` or sorted `.env.formatted` output.

Key Features & Performance

  • Side-by-side `.env` diff highlights missing production keys before broken deployments
  • One-click secret scrubber converts tokens, passwords, and DSNs into safe placeholder hints
  • Optional alphabetical sorting with duplicate key deduplication (last definition wins)
  • Supports `export KEY=VALUE`, single/double-quoted values, and comment preservation on format
  • Zero telemetry: safe for Stripe keys, database passwords, and JWT secrets

Methodology, Formulas & Technical Standards

Keys are normalized after trimming optional `export ` prefixes; comparison classifies entries into `added`, `removed`, `changed`, and `equal`. Secret sanitization preserves non-secret toggles (booleans, URLs without credentials, ports) while blanking keys matching secret/key/token/password/dsn patterns.

Common Real-World Use Cases

  • Catching missing Cloudflare Pages or Docker environment variables before deploying a release
  • Generating a clean `.env.example` template prior to committing a new open-source repository
  • Auditing drift between `.env.staging` and `.env.production` snapshots locally
  • Alphabetizing sprawling microservice `.env` manifests for easier code reviews

Worked Examples & Edge Cases

Secret Scrubbing to .env.example

Input
STRIPE_SECRET_KEY=sk_live_abc123
PORT=3000
Output
STRIPE_SECRET_KEY=YOUR_STRIPE_SECRET_KEY
PORT=3000

Secret credentials are replaced while non-secret operational defaults stay readable.

Environment Drift Detection

Input
Left: CACHE_TTL=3600 | Right: CACHE_TTL=86400 + SENTRY_DSN=...
Output
~1 changed (CACHE_TTL), +1 added (SENTRY_DSN)

Immediately reveals missing observability variables across environments.

Limitations, Scope & Accuracy Notes

  • • Variable interpolation syntax (`${HOST}`) is compared verbatim rather than expanded at runtime.
  • • Always verify generated `.env.example` files before pushing if non-standard secret variable names hold credentials.

Local Browser Processing & Privacy

Traditional web converters upload your documents, snippets, or media files to remote servers. .env Diff, Formatter & Secret Sanitizer runs inside your browser tab:

Processed in This Tab

Your input text and files are processed locally without uploading payloads to a processing server.

No Tool Payload Logging

Microdeck does not log or store the files or inputs you paste into tool workspaces (normal static hosting/CDN requests still load page assets).

Tab Memory Lifecycle

Working outputs stay in your browser tab and are released when you reset the tool or close the tab.

Frequently Asked Questions

Is it safe to paste real production `.env` secrets here?

Yes — parsing, diffing, and secret redaction happen strictly inside your browser tab RAM with zero outbound API requests.

What happens when a `.env` file defines the same key twice?

Following standard dotenv override precedence, the parser keeps the latest non-empty assignment for diffing and formatting.

Does the sanitizer preserve `export` prefixes or quoted comments?

Yes. `export ` prefixes are normalized to standard `KEY=VALUE` lines cleanly while stripping unescaped inline noise.

Can I download `.env.example` directly?

Yes. Switch to Scrub Secrets -> .env.example and click Save to download `.env.example` immediately.

Explore Related Micro-Tools

Support Microdeck

Completely optional · From $3 · No account required

Choose an amount (USD):Selected:$5

Minimum support amount is $3 USD.

Completely optional · From $3 · Checkout opens on Gumroad.