General dev

.env Checker & Sorter

Runs locally

Use .env Checker & Sorter

What it does

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.

It runs entirely in your browser: nothing you enter is uploaded.

Example

.env with a repeated key

Input
DB_HOST=localhost
DB_PORT=5432
API_KEY=
SMTP_PASSWORD=change-me
DB_PORT=6432
# feature flags
DEBUG=false
Output (captured 2026-10-20)
VARIABLES
5
DUPLICATES
1
EMPTY VALUES
1
 Duplicates: DB_PORT
 Empty: API_KEY

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.