Skip to content
Jellykit

JSON to .env

Convert a JSON object into .env KEY=value lines. Nested objects are flattened with underscores, keys become UPPER_SNAKE_CASE and values are quoted when needed.

Runs in your browser. Nothing is uploaded.

About JSON to .env

JSON to .env flattens a config object into environment variables: redis.host becomes REDIS_HOST, camelCase keys become snake case, and any value with spaces, quotes, # or $ is wrapped in double quotes so dotenv reads it correctly.

Use it to move settings from a JSON config into a .env file, Docker Compose, a CI secret store or a hosting dashboard.

How to use JSON to .env

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. Adjust the options. The result updates as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

What happens to arrays?

They're written as JSON text, for example TAGS="[\"a\",\"b\"]", which your app can JSON.parse.

Can I keep my original key names?

Untick UPPER_SNAKE_CASE to keep keys as they are (nested keys are still joined with _).

Is JSON to .env free and private?

Yes. JSON to .env is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →