Free JSON to .env — dotenv · shell export · Docker

Convert JSON to .env
Flatten nested JSON
to KEY=VALUE.

Convert any JSON object to .env dotenv format, shell export statements or Docker env-file. Nested keys become UPPER_SNAKE_CASE. Runs entirely in your browser.

Your data never leaves your browser
.env · export · Docker formats
Nested JSON flattened automatically
Always free
JSON to .env Converter   100% client-side
Nested JSON keys are flattened with underscores: {"db": {"host": "localhost"}} → DB_HOST=localhost
JSON input
  .env ready

      

Common use cases

Node.js and Docker

Convert a JSON config file to a .env file for use with dotenv, Docker Compose or Kubernetes ConfigMaps. Nested config sections become prefixed env var names — database.host becomes DATABASE_HOST.

ASP.NET appsettings.json

ASP.NET Core reads environment variables as config overrides. Convert your appsettings.json to env vars to override config in CI/CD pipelines or Docker containers — matching the SECTION__KEY convention with the double-underscore separator option.

CI/CD pipelines

GitHub Actions, GitLab CI and CircleCI accept environment variables as key-value pairs. Convert your JSON secrets or config to shell export statements — paste directly into a CI env block or source the file in your pipeline script.

Cloud config

AWS Lambda, ECS task definitions, App Runner and ECS all accept environment variables as key-value pairs. Convert JSON config to the right format for each service — dotenv for Lambda layers, export for shell scripts, Docker format for container definitions.

All data & config formats tools

JSON flattened to env vars
in your browser. No upload.

The flattener recursively traverses the JSON tree and builds UPPER_SNAKE_CASE keys from the path. camelCase keys are converted with underscore insertion before each uppercase letter. Special characters are removed to produce valid env var names.

The double-underscore separator option produces SECTION__KEY format — the convention used by ASP.NET Core, Kubernetes ConfigMaps and many other frameworks for hierarchical environment variable overrides.

3 output formats

dotenv KEY=VALUE, shell export KEY="VALUE", and Docker --env KEY=VALUE — covering every CI/CD and container use case.

camelCase → UPPER_SNAKE

apiKey → API_KEY, maxRetries → MAX_RETRIES — automatic conversion following shell env var naming conventions.

Key prefix option

Add a prefix to all generated keys — APP_DATABASE_HOST, MYAPP_API_KEY — for namespace isolation in shared environments.

52 tools, always free

No watermarks, no account. Funded by non-intrusive display advertising only.

Frequently asked questions

How does JSON flattening to env vars work?

Nested JSON keys are joined with underscores and converted to uppercase: {database: {host: "localhost"}} becomes DATABASE_HOST=localhost. camelCase is converted with underscore insertion: apiKey becomes API_KEY. Arrays are serialized as JSON strings: tags=["a","b"] becomes TAGS=["a","b"].

How do I use the generated .env file?

Save as .env in your project root and load with dotenv (Node.js: require('dotenv').config()), python-dotenv (load_dotenv()), or godotenv (godotenv.Load()). For Docker: docker run --env-file .env myimage. For Docker Compose: env_file: - .env in your service definition.

Is the JSON to .env converter free?

Yes, completely free. No account required.
Go up