.env to netlify.toml Converter
Convert .env variables into a netlify.toml environment block for production, deploy-preview, or branch-deploy contexts, or extract netlify.toml back to .env.
About This Tool
Converts standard .env key-value files into Netlify TOML environment blocks ([context.production.environment], [context.deploy-preview.environment], [context.branch-deploy.environment], or [build.environment]).
Also runs in reverse: paste a full netlify.toml file and extract only the environment section keys back into a clean .env file.
Key Features
- Bidirectional .env <-> netlify.toml: Switch between .env to netlify.toml and netlify.toml to .env with one click.
- Deploy context selector: Target production, deploy-preview, branch-deploy (or a specific git branch name), dev, or global build.environment.
- Ignores non-environment TOML blocks: When converting netlify.toml back to .env, [build], [[redirects]], and [[headers]] sections are skipped automatically.
- Key sorting & export prefix: Optionally sort variable keys alphabetically or prepend export to generated .env lines.