.env to Netlify TOML
Runs locally in your browserTurn a .env file into a netlify.toml environment block for any Netlify deploy context
Paste a .env file, load a file, or load an example.
Related Tools
.env to Netlify TOML
Convert a .env file into a netlify.toml environment block for one Netlify deploy context. Each variable becomes a KEY = "value" line with correct TOML escaping, in the same order as your file.
How to Use
- 1.Paste a .env file, load one, or load an example.
- 2.Choose the deploy context: Production, Deploy Preview, Branch Deploy, Dev, All contexts or a custom branch.
- 3.Turn on Safe Template Mode to replace secret-looking values with "<REDACTED>".
- 4.Under Advanced, sort keys or keep comments.
- 5.Copy the TOML or download netlify.toml and merge it into your existing file.
Parsing Rules
Supports KEY=value, export KEY=value, spaces around =, empty values, single quotes (literal), double quotes (\n, \", \\ escapes) and multiline quoted values. A # starts a comment only at the start of a line or after whitespace in an unquoted value; # inside quotes is kept. Values containing = stay intact. Duplicate keys keep the last value, like dotenv, and are reported with line numbers.
Limits and Privacy
netlify.toml is normally committed to your repository, so keep production secrets in the Netlify UI or CLI unless you intend to commit them. Secret detection is a key-name heuristic and can miss or over-match keys. Conversion runs in your browser; the .env text is not uploaded or saved, and only options are kept in browser storage.
