appsettings.json ⇄ Environment Variables

Flatten appsettings.json into env vars for Docker, Kubernetes and Azure, or rebuild it from them.

Runs locally · nothing uploaded
appsettings.json
.env

What it does

ASP.NET Core reads appsettings.json and environment variables into the same configuration tree. Nested sections become keys like Logging:LogLevel:Default, and array items get an index (Cors:AllowedOrigins:0). In environment variable names the : is written as __. This tool does that conversion in both directions, live as you type.

Features

  • Output formats: .env, Docker Compose environment:, Kubernetes env: list, Azure App Service JSON for “Advanced edit” (name / value / slotSetting), PowerShell $env:, bash export, launchSettings.json, dotnet user-secrets set commands and plain .NET keys.
  • Reads real files: comments and trailing commas in appsettings.json are accepted. Duplicate keys are reported with their line number, since .NET refuses to load them.
  • Prefixes: add a prefix such as MYAPP_ for AddEnvironmentVariables("MYAPP_"). In reverse, variables without the prefix are ignored, just as the provider ignores them.
  • Secret detection: keys like Password, Secret, ApiKey, Token, SigningKey and everything under ConnectionStrings are flagged. They can be left out or replaced with Kubernetes secretKeyRef entries, Key Vault references or ${VAR} placeholders.
  • Reverse direction: paste variables in any of the formats above, even mixed together. You get appsettings.json back with arrays, merged casing and optional number/boolean types. Azure SQLCONNSTR_ style prefixes map to ConnectionStrings.
  • Platform quirks: $ is escaped as $$ for Compose. Names bash cannot export are flagged, and so are dots in names, which Azure App Service on Linux turns into _.

How to use it

Paste your appsettings.json and pick a format, then copy or download the result. Swap feeds the output back in the other direction so you can check the round trip.

Privacy

Everything runs in your browser. Your input is kept in local storage only when it contains nothing that looks like a secret.