# More flexible Environment Variables in Edge Functions and Middleware

**Published:** May 24, 2023 | **Authors:** Javi Velasco, Gal Schlezinger

---

> **Note:** This changelog entry is historical. Edge Functions are deprecated for new projects. Use [Vercel Functions](https://vercel.com/docs/functions) with the Node.js runtime and [Fluid compute](https://vercel.com/docs/fluid-compute). Use [Routing Middleware](https://vercel.com/docs/routing-middleware) for request-time routing before a response completes.

You now have more flexible access and improved limits for environment variables from [functions using the Edge Runtime](https://vercel.com/docs/functions/runtimes/edge/edge-functions) and [Routing Middleware](https://vercel.com/docs/routing-middleware):

- The max environment variable size is now 64KB instead of 5KB, [same as Vercel Functions](https://vercel.com/docs/concepts/limits/overview#functions-comparison).
- Other than the [reserved names](https://vercel.com/docs/concepts/projects/environment-variables/reserved-environment-variables), there are no additional restrictions to name environment variables.
- Accessing `process.env` is no longer restricted to be statically analyzable. This means that, for example, you can now compute variable names such as `process.env[`${PREFIX}_SECRET`]`.

[Check out the documentation](https://vercel.com/docs/concepts/projects/environment-variables) to learn more.

---

📚 **More updates:** [View all changelog entries](/changelog/sitemap.md) | [Blog](/blog/sitemap.md)