.env to netlify.toml Converter

Convert .env variables into a netlify.toml build environment block.

.env to netlify.toml Converter

Convert .env files into the netlify.toml environment block so build variables are easy to manage. This is useful when moving a local project setup into Netlify build settings.

How to use the .env to netlify.toml Converter

  1. Paste your .env file contents.
  2. Click Convert.
  3. Copy the generated [build.environment] block.

Common use cases

  • Migrating local env vars into Netlify.
  • Sharing a consistent build config across teams.
  • Verifying which variables are needed for deploys.
  • Cleaning up duplicated config values.

Tips & notes

  • Keep secrets out of version control when editing netlify.toml.
  • Review values to ensure they are quoted correctly.
  • Use consistent naming across environments for easier diffs.

Related developer tools

  • Environment Variable Comparator
  • URL Encoder
  • JSON Formatter

FAQ

Where do the values go in netlify.toml?
They are placed under [build.environment].
Are comments ignored?
Yes. Lines starting with # are skipped.
Are existing netlify.toml settings overwritten?
No. This tool only outputs the environment block for you to merge.