All Tools View Categories About Contact Privacy

.env to Vercel/Netlify Env Converter

Convert a .env file into Vercel env add commands or a Netlify env:set / TOML environment block.

Runs entirely in your browser — nothing is uploaded.

About .env to Vercel/Netlify Env Converter

Serverless platforms each define their own way to feed environment variables into your deployments. Vercel keeps them in the project dashboard and the vercel env add CLI. Netlify offers netlify env:set, a dashboard, and the declarative [context.*.environment] block in netlify.toml. Getting a .env of real values into those systems by hand means typing commands or YAML blocks key by key — exactly where a value gets mistyped.

The .env to Vercel/Netlify Converter generates the ready-to-run artifact. For Vercel it prints the vercel env add command for every key in your chosen environment. For Netlify it prints either the netlify env:set commands with properly quoted values, or a complete [context.<name>.environment] TOML block you can paste into netlify.toml.

Values are validated, duplicates are flagged, TOML strings are escaped correctly, and the entire conversion runs in the browser — nothing is uploaded anywhere.

Features

  • Vercel commands: vercel env add KEY <environment> per key.
  • Netlify commands: netlify env:set KEY "value" with quoting.
  • TOML block: [context.*.environment] ready for netlify.toml.
  • Context selection: production, preview, development, or branch names.
  • Correct escaping: TOML basic-string escapes for quotes and backslashes.
  • Key validation: letters, digits and underscores; duplicates flagged.
  • Copy or download: clipboard or a .txt/.toml file in one click.
  • Private: all conversion happens in your browser.

How to Use

  1. Paste your .env content into the input box, or load the sample.
  2. Pick a platform — Vercel or Netlify — and an output style.
  3. Choose the context (production/preview/development or a branch).
  4. Click Convert. The commands or TOML block appear on the right.
  5. Copy or download and run in the terminal or paste into netlify.toml.

Examples

Example 1 — Vercel project bootstrap. A frontend dev runs the generated vercel env add lines for the production environment and their Next.js deploys pick up the variables instantly.

Example 2 — Netlify CLI. A Jamstack engineer pastes the netlify env:set commands into the terminal; the double-quoted values keep spaces and ampersands intact.

Example 3 — netlify.toml. A team keeps configuration in git by pasting the generated [context.production.environment] block into their netlify.toml.

Example 4 — Preview parity. An agency generates the same block for deploy-preview so preview builds use identical env values to production.

Example 5 — Onboarding. A new contributor loads the sample, picks a platform, and deploys with correct environment config on the first try.

Benefits

  • Platform-correct: commands and TOML match each host's rules.
  • No retyping: values are derived, not transcribed.
  • Reviewable: deterministic output you can eyeball.
  • Escaping-safe: quotes and backslashes survive TOML.
  • Context-aware: production, preview, development and branches.
  • Private & free: browser-only, no account.

Frequently Asked Questions

What does this tool do?
It reads a .env file and emits the commands or config your serverless host needs: vercel env add for Vercel, netlify env:set or a [context.*.environment] TOML block for Netlify.
Which platform should I pick?
Vercel stores env vars per project and environment (production/preview/development); the CLI adds them interactively. Netlify supports both CLI commands and the netlify.toml file, where a TOML block is the most reviewable option.
How are values quoted for the CLI?
For netlify env:set the value is wrapped in double quotes so spaces and special characters are passed intact. Vercel env add prompts for the value, so only the key and environment are printed.
What is the Netlify TOML context?
Netlify supports contexts like production, deploy-preview, and branch-deploy. The tool emits a [context.&lt;name&gt;.environment] block with each key as KEY = "value" using TOML string escaping.
Is my data uploaded?
No. Everything runs client-side in your browser. Nothing is sent to any server, stored or logged.
Do Vercel and Netlify allow any key?
Both accept standard environment variable names. The tool validates keys as letters, digits and underscores, and flags duplicates with line numbers.