JSON ↔ Environment Variables
Tip: Use "#" to comment out env lines
JSON
Pretty JSON
{
"api": { "url": "https://api.example.com", "timeout": 30 },
"debug": true
}ENV format
KEY=VALUE per line
API_URL=https://api.example.com
API_TIMEOUT=30
DEBUG=trueBehavior:
- When converting JSON → ENV nested objects are flattened using selected separator.
- When converting ENV → JSON values are parsed with JSON.parse when possible (objects/arrays/numbers/booleans), otherwise treated as strings.
- The Uppercase option (when using underscore separator) influences key normalization when converting ENV → JSON in non‑flat mode: e.g. API_URL → api.url.
- Flat mode: when enabled ENV keys are preserved as top-level JSON properties (no nesting). Example:
HELLO_URL=https://hello-world.com/package becomes {"HELLO_URL":"https://hello-world.com/package"}.