.env Formatter & Validator
Format, sort and validate .env files: catch duplicate keys, bad names and unquoted spaces, and convert to JSON or a .env.example. Secrets stay on your device.
No uploads
# App APP_NAME=ToolWand app_env=production DATABASE_URL=postgres://user:pass@localhost:5432/db GREETING="hello world" PORT=8080 API_KEY=sk-test-123 1BAD=oops MULTI="line one\nline two"
9 variables · 2 errors · 5 warnings
- ! Line 3: app_env: convention is UPPER_SNAKE_CASE
- ! Line 3: app_env: spaces around = are not supported by every loader
- ! Line 6: GREETING: value contains spaces but is not quoted
- ! Line 7: PORT: duplicate (first on line 4); the last value wins
- ! Line 8: API_KEY: "export" prefix removed
- ✕ Line 9: 1BAD: invalid name (letters, digits, _ only; cannot start with a digit)
- ✕ Line 10: Not a KEY=value line: "not a valid line"
How to use .env Formatter & Validator
- 1Open .env Formatter & Validator. It runs in your browser, no sign-up.
- 2Type or paste your input.
- 3Copy or download the result.
Questions
Are my secrets safe?
Yes. Everything runs in your browser — nothing is uploaded or stored.
What does .env.example do?
It keeps every key but empties the values, so you can commit it to show which variables the app needs.
Which value wins for duplicate keys?
Most loaders (like dotenv) keep the last one. Dedupe keeps the last value too.
More tools
JSON Formatter & ValidatorPretty-print, minify, validate Base64 Encoder & DecoderText and files Hash GeneratorMD5, SHA-1, SHA-256, SHA-512 Password & UUID GeneratorStrong, random, local Regex TesterLive matches and groups JWT DecoderHeader, payload, expiry Diff CheckerCompare two texts CSV ↔ JSON ↔ YAML ↔ XMLConvert data formats