---
title: How do I migrate away from `vercel.json` env and build.env?
description: Information on how to migrate your `vercel.json` environment variables to the Environment Variables UI.
url: /kb/guide/how-do-i-migrate-away-from-vercel-json-env-and-build-env
canonical_url: "https://vercel.com/kb/guide/how-do-i-migrate-away-from-vercel-json-env-and-build-env"
last_updated: 2026-07-16
authors: Sam Ko
related:
  - /docs/environment-variables
  - /docs/configuration
  - /docs/platform/projects
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

This article will help you migrate your `vercel.json` environment variables (legacy method) to the [Environment Variables UI](https://vercel.com/docs/environment-variables).

## Migrate Your Environment Variables

You may have configured the [`env`](https://vercel.com/docs/configuration#project/env) and [`build.env`](https://vercel.com/docs/configuration#project/build-env) legacy properties in a `vercel.json` file:

`{ "env": { "MY_KEY": "this is the value", "SECRET": "@my-secret-name" }, "build": { "env": { "MY_KEY": "this is the value", "SECRET": "@my-secret-name" } } }`

We **no longer** recommend you use this legacy method for environment variables. Instead, we recommend you migrate your environment variables to the [Environment Variables UI](https://vercel.com/docs/environment-variables). Here is how to add the same envrionment variables setup to our Environment Variables UI using the example above:

Migrating to the Environment Variables UI will help you avoid errors when implementing your environment variables.

## Redeploy

Once you have successfully moved your environment variables to the [Environment Variables UI](https://vercel.com/docs/environment-variables), make sure to redeploy your [Vercel Project](https://vercel.com/docs/platform/projects) to reflect these new changes.