← All tools

Docker Compose .env Variable Resolver

Paste your docker-compose.yml and (optionally) your .env file and any shell-exported overrides. See exactly what value every ${VAR} resolves to, where it came from, and which ones would silently fall back to an empty string — the most common cause of a container starting with a blank password or missing config that nobody notices until runtime.

Why isn't my ${VAR} being replaced in docker-compose.yml?

Compose-file interpolation (the ${VAR} syntax in docker-compose.yml itself) only pulls from your shell's exported environment variables or a .env file in the project directory (or one passed via --env-file). It does not read values from that same file's own environment: or env_file: blocks — those only set variables inside the running container, after the compose file has already been parsed and interpolated. This is the single most common cause of a variable silently staying blank.

What's the difference between ${VAR}, ${VAR:-default}, and ${VAR-default}?

${VAR} resolves to an empty string (with a warning from Compose) if VAR is unset. ${VAR:-default} uses default if VAR is unset or set to an empty string. ${VAR-default} (no colon) only uses default if VAR is completely unset — an explicitly empty value is left empty. The colon controls whether an empty string counts as "unset" for the default's purposes.

Does this tool upload my compose file or .env values anywhere?

No. Everything is parsed and resolved entirely in your browser with plain JavaScript — your compose file, .env contents, and any secrets in them are never sent to a server.