Skip to content
masterclass Buddy

T3 Stack · Function

createEnv

Define and validate environment variables with createEnv and Zod. Read them through a typed env object, while keeping server values out of client code.

Last updated

Syntax

createEnv({ server, client, runtimeEnv })

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • @t3-oss/env-nextjs
  • @t3-oss/env-core
  • zod
  • createEnv
  • .env.example
  • runtimeEnv
  • server
  • client

Source: Environment Variables • Create T3 App. Checked 2026-11-03.