JSON to .env Converter
Turn appsettings.json into environment variables in one click.
About this tool
Moving a .NET app into Docker or a cloud platform usually means translating appsettings.json into environment variables. Paste your JSON and get a ready .env block: nested sections are flattened with double underscores — exactly the convention ASP.NET Core's configuration system expects — so every value maps back one-to-one at runtime.
Features
- Flattens nested JSON into KEY=value lines
- Double-underscore separator — the ASP.NET Core convention
- Handles deeply nested sections and arrays
- One-click copy of the generated .env block
- Runs entirely in your browser
FAQ
How is appsettings.json nesting handled?
Nested objects are flattened with a double underscore between levels — Logging:LogLevel:Default becomes Logging__LogLevel__Default. That's the separator ASP.NET Core's environment variable configuration provider understands on every platform.
Why double underscores instead of colons?
Colons aren't valid in environment variable names on most systems, so .NET treats a double underscore as the section separator. The generated keys work in Docker, Linux, Kubernetes and anywhere else.
What about arrays in my JSON?
Array items are flattened by index, so a Hosts array becomes Hosts__0, Hosts__1 and so on — the same indexing ASP.NET Core uses to bind arrays from environment variables.
Is my configuration uploaded anywhere?
No. Parsing and conversion happen entirely in your browser — safe even for configs containing connection strings or keys.