# .env Checker & Sorter

URL: https://phishdestroy.io/developer-tools/env-file-formatter
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Paste a .env file to count its variables and list names defined twice or left empty, or sort the entries alphabetically. Useful before a deploy and when you review a .env file found in a phishing kit.

## Example input

.env with a repeated key

```
DB_HOST=localhost
DB_PORT=5432
API_KEY=
SMTP_PASSWORD=change-me
DB_PORT=6432
# feature flags
DEBUG=false
```

Analyze shows 5 variables, 1 duplicate (DB_PORT, defined twice) and 1 empty value (API_KEY).

## FAQ

### What does Analyze check?

Every line of the form NAME=value whose name starts with a letter or underscore: it counts distinct names and lists those defined more than once and those with an empty value. Sort A→Z rewrites the input with comments and blank lines first, then the variables in alphabetical order.

### Which lines are not understood?

Lines with spaces around = (KEY = value) or an export prefix are not counted, and KEY="" is not treated as empty. Sort A→Z drops lines that start with a space or another character and moves every comment to the top, away from the variable it describes, so keep a copy of the original.

### Are my secrets sent anywhere?

No. The file is analysed in your browser and nothing is uploaded or stored; still, use a redacted copy rather than live production secrets.

## Related tools

- [.gitignore Templates](https://phishdestroy.io/developer-tools/gitignore-templates)
- [API Key Format Tester](https://phishdestroy.io/developer-tools/api-key-format-tester)
- [Docker Run to Compose Converter](https://phishdestroy.io/developer-tools/docker-run-to-compose)
- [Sort & Deduplicate Lines](https://phishdestroy.io/developer-tools/sort-deduplicate-lines)
- [Find & Replace](https://phishdestroy.io/developer-tools/find-and-replace)

All tools: https://phishdestroy.io/developer-tools
