.env to netlify.toml Converter
Quickly transform local .env variables into Netlify build configurations. Automatically ignores comments and escapes quotes.
Step-by-Step Instructions
Paste .env Environment Variables
Paste standard KEY=VALUE pairs from your .env, .env.local, or .env.production file.
Select Build Contexts
Choose target deployment contexts: global `[build.environment]`, `[context.production.environment]`, or `[context.deploy-preview.environment]`.
Configure Quoting & Formatting
Select TOML string escaping and quote wrapping rules for special characters.
Copy or Append to netlify.toml
Copy the formatted TOML environment block directly into your project's `netlify.toml` root configuration.
Key Features & Capabilities
- Converts standard `.env` key-value pairs into valid TOML table syntax (`[build.environment]`)
- Multi-context deployment support for Netlify (Production, Deploy Preview, Branch Deploys)
- Automatic escaping of special characters, quotes, and multiline private key strings (e.g., RSA/SSH keys)
- Comment preservation and whitespace normalization
Frequently Asked Questions
Why should you store environment variables in netlify.toml?
Adding non-secret build environment variables to `netlify.toml` enables version-controlled, reproducible builds across development branches, staging previews, and production releases without requiring manual configuration in the Netlify web UI dashboard.
Should confidential production secrets (like API keys) be committed in netlify.toml?
No. Sensitive credentials, production database passwords, and private API keys should **never be committed to Git in netlify.toml**. Sensitive secrets should be configured securely in the Netlify Web UI under *Site Configuration > Environment Variables*. Use `netlify.toml` for public configuration flags (Node version, build commands, public analytics IDs).
How does TOML format multiline private keys from a .env file?
Multiline environment variables (such as PEM private keys) in `.env` files are formatted in TOML using triple-quoted multiline strings (`"""..."""`) or escaped newline characters (`\n`), ensuring clean parsing by the Netlify build runner.
How do Netlify deployment context overrides work in TOML?
Variables defined under `[build.environment]` apply globally to all builds. You can override specific variables for staging by creating context tables: `[context.deploy-preview.environment]` or `[context.branch-name.environment]`, which override global settings during PR preview builds.
Related Utilities
Discover complementary online tools in the same workflow.
JSON Formatter & Validator
Format, beautify, minify, validate, and view JSON data online with instant syntax highlighting and error detection.
Base64 Encoder & Decoder
Encode text or binary data into Base64 format or decode Base64 back into raw string format.
CSV to JSON Converter
Easily convert CSV data to clean JSON format. Turn tabular spreadsheets into structured JSON.
YAML to JSON Converter
Convert YAML configuration files into structured JSON for APIs and modern web tooling.
JWT Parser & Token Debugger
Decode JWT tokens to view header, payload claims, and expiration status without sending secrets anywhere.
Hash Generator (SHA-256, SHA-512, MD5)
Generate cryptographically secure SHA-256, SHA-512, SHA-384, and SHA-1 hashes for any text.