Cloudflare Platform Environment Variables

Platform-injected build-time and runtime environment variables, shown via each access method.

Pages Build-time Variables

Injected by Cloudflare Pages during the build step. Docs

VariableValue
CI(not set)
CF_PAGES1
CF_PAGES_COMMIT_SHA306a9d46c1e58ce0ba664487e2f11427b16f0a22
CF_PAGES_BRANCHmain
CF_PAGES_URLhttps://9d953871.2026-04-28-env-var-pages.pages.dev

Workers Builds Variables

Injected by Workers Builds (CI/CD) during the build step. Docs

VariableValue
CI(not set)
WORKERS_CI(not set)
WORKERS_CI_BUILD_UUID(not set)
WORKERS_CI_COMMIT_SHA(not set)
WORKERS_CI_BRANCH(not set)

Pages Build Image Tool Overrides

Recognised by the Pages build environment to control which versions of languages and tools are used. Docs

VariableValue
NODE_VERSION(not set)
BUN_VERSION(not set)
PYTHON_VERSION(not set)
RUBY_VERSION(not set)
GO_VERSION(not set)
HUGO_VERSION(not set)
PNPM_VERSION(not set)
YARN_VERSION(not set)
ZOLA_VERSION(not set)
EMBEDDED_DART_SASS_VERSION(not set)
SKIP_DEPENDENCY_INSTALL(not set)

NODE_ENV

Statically replaced at build time by Wrangler/esbuild. "development" for wrangler dev, "production" for wrangler deploy. Docs

VariableValue
NODE_ENVproduction

Runtime: env parameter

The standard way to access bindings and variables. Passed as the second argument to the fetch handler, or on context.env in Pages Functions. Docs

Variable / BindingValue / Type
ASSETS[Fetcher Binding]
CF_PAGES1
CF_PAGES_BRANCHmain
CF_PAGES_COMMIT_SHA306a9d46c1e58ce0ba664487e2f11427b16f0a22
CF_PAGES_URLhttps://9d953871.2026-04-28-env-var-pages.pages.dev

Runtime: process.env

Available when nodejs_compat is enabled and compatibility_date >= 2025-04-01. Populated lazily on first access of process. JSON vars that resolve to strings are parsed; others are JSON-stringified. Docs

Variable / BindingValue / Type
CF_PAGES1
CF_PAGES_BRANCHmain
CF_PAGES_COMMIT_SHA306a9d46c1e58ce0ba664487e2f11427b16f0a22
CF_PAGES_URLhttps://9d953871.2026-04-28-env-var-pages.pages.dev

Runtime: import { env } from "cloudflare:workers"

Global import approach. Useful for accessing bindings from top-level scope or deeply nested functions without threading env through every call. Docs

Variable / BindingValue / Type
ASSETS[Fetcher Binding]
CF_PAGES1
CF_PAGES_BRANCHmain
CF_PAGES_COMMIT_SHA306a9d46c1e58ce0ba664487e2f11427b16f0a22
CF_PAGES_URLhttps://9d953871.2026-04-28-env-var-pages.pages.dev