Env Diff is a modern, fast, and secure web application designed to compare, analyze, and merge two .env files or JSON configuration objects.
This application runs 100% locally in your browser. No data is sent to any server, keeping your credentials, access tokens, and API keys completely safe and private.
- 🔒 100% Private & Secure: All file parsing and processing are performed entirely in-memory within your browser (client-side).
- 🔄 Smart Comparison:
- Identical: Highlights variables that share the exact same key and value on both sides.
- Mismatch: Detects variables with matching keys but different values.
- Only Base / Only Compare: Highlights unique variables that only exist in one environment file.
- 🔍 Character-Level Highlights (Inline LCS Diffing): Clearly displays added or removed characters on mismatched values using the Longest Common Subsequence (LCS) algorithm.
- ⚡ Interactive Conflict Resolution:
- Resolve mismatches instantly with Keep Base or Keep Compare.
- Exclude unique variables from the merged export with Remove, or put them back with Restore.
- Toggle masking to hide or show sensitive secrets/passwords.
- 📋 Live Export Preview: Inspect the fully merged environment output in real-time and copy it to your clipboard with a single click.
- 💾 Multi-Format Export: Download your resolved environment configuration directly as a
.envor.jsonfile. - 📂 Drag & Drop Upload: Drag
.envor.jsonfiles directly onto either input area to compare them immediately.
- Node.js (version 24 or higher recommended)
- npm (version 11 or higher recommended)
Install the project dependencies:
npm installRun the local development server with Hot Module Replacement (HMR):
npm run devOpen http://localhost:5173 in your browser.
Compile and bundle the application for production:
npm run buildThis application is configured for deployment on Cloudflare Workers. You can deploy it instantly using Wrangler:
# Build and deploy to Cloudflare
npm run deployYou can also run the application containerized using Docker. A multi-stage Dockerfile is provided in the repository root.
-
Build the image:
docker build -t env-diff . -
Run the container:
docker run -p 3000:3000 env-diff
The application will be accessible at http://localhost:3000.
This application is built with a modular architecture:
app/
├── routes/ # Route endpoints and route-level components
├── pages/ # Main workspace layout, inputs, toolbar, and diff table
├── widgets/ # Standalone UI widgets (e.g., alert banners, confirmation dialogs)
├── entities/ # Parsing logic and core diffing algorithms
└── shared/ # Generic reusable UI primitives (e.g., Button, Badge, TextArea)
Built with ❤️ to simplify environment configuration management for developers.