Skip to Content
GuidesConfig Converter

Config Converter

Convert configuration files between .env, appsettings.json, secrets.yaml, and config.toml. Works as a standalone utility — no authentication or project required.


Supported Formats

FormatExtensionDescription
dotenv.envStandard key-value pairs.
ASP.NET Settingsappsettings.jsonNested JSON for .NET IConfiguration.
Kubernetes Secretssecrets.yamlYAML manifest with base64-encoded values.
TOMLconfig.tomlTom’s Obvious Minimal Language.

All format combinations are supported in any direction.


Web Converter

Available at /converter in the dashboard. Side-by-side layout: paste or upload source config on the left, choose target format on the right, and the converted output appears automatically. Copy to clipboard or download.


CLI Usage

depvault convert --file <path> --from <format> --to <format> [--output <path>]
FlagDescriptionRequired
--filePath to the input file.Yes
--fromSource format: env, appsettings.json, secrets.yaml, config.toml.Yes
--toTarget format (same options).Yes
--outputOutput file path. Prints to stdout if omitted.No

Examples

# .env to appsettings.json depvault convert --file .env --from env --to appsettings.json --output appsettings.json # YAML to TOML depvault convert --file secrets.yaml --from secrets.yaml --to config.toml --output config.toml # Preview to stdout depvault convert --file config.toml --from config.toml --to env

The convert command is fully offline — no API calls, no authentication.


Edge Case Handling

  • Comments — Preserved when the target format supports them (TOML); stripped otherwise (JSON, YAML).
  • Multiline values — Expanded into proper multiline syntax per target format.
  • Special characters — Properly escaped or quoted in the output.
  • Nested keysappsettings.json nested objects are flattened with __ separators in flat formats (e.g., CONNECTIONSTRINGS__DEFAULT). Keys with __ in .env are expanded into nested objects when converting to JSON.

Conversion Matrix

From \ To.envappsettings.jsonsecrets.yamlconfig.toml
.envFlat to nested via __Base64 encodeGroup by prefix
appsettings.jsonFlatten with __Base64 encodeMap to TOML tables
secrets.yamlBase64 decodeDecode and nestDecode and group
config.tomlFlatten with __Map tables to objectsBase64 encode