Platform-injected build-time and runtime environment variables, shown via each access method.
Injected by Cloudflare Pages during the build step. Docs
| Variable | Value |
|---|---|
| CI | (not set) |
| CF_PAGES | 1 |
| CF_PAGES_COMMIT_SHA | 306a9d46c1e58ce0ba664487e2f11427b16f0a22 |
| CF_PAGES_BRANCH | main |
| CF_PAGES_URL | https://9d953871.2026-04-28-env-var-pages.pages.dev |
Injected by Workers Builds (CI/CD) during the build step. Docs
| Variable | Value |
|---|---|
| CI | (not set) |
| WORKERS_CI | (not set) |
| WORKERS_CI_BUILD_UUID | (not set) |
| WORKERS_CI_COMMIT_SHA | (not set) |
| WORKERS_CI_BRANCH | (not set) |
Recognised by the Pages build environment to control which versions of languages and tools are used. Docs
| Variable | Value |
|---|---|
| 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) |
Statically replaced at build time by Wrangler/esbuild.
"development" for wrangler dev,
"production" for wrangler deploy.
Docs
| Variable | Value |
|---|---|
| NODE_ENV | production |
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 / Binding | Value / Type |
|---|---|
| ASSETS | [Fetcher Binding] |
| CF_PAGES | 1 |
| CF_PAGES_BRANCH | main |
| CF_PAGES_COMMIT_SHA | 306a9d46c1e58ce0ba664487e2f11427b16f0a22 |
| CF_PAGES_URL | https://9d953871.2026-04-28-env-var-pages.pages.dev |
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 / Binding | Value / Type |
|---|---|
| CF_PAGES | 1 |
| CF_PAGES_BRANCH | main |
| CF_PAGES_COMMIT_SHA | 306a9d46c1e58ce0ba664487e2f11427b16f0a22 |
| CF_PAGES_URL | https://9d953871.2026-04-28-env-var-pages.pages.dev |
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 / Binding | Value / Type |
|---|---|
| ASSETS | [Fetcher Binding] |
| CF_PAGES | 1 |
| CF_PAGES_BRANCH | main |
| CF_PAGES_COMMIT_SHA | 306a9d46c1e58ce0ba664487e2f11427b16f0a22 |
| CF_PAGES_URL | https://9d953871.2026-04-28-env-var-pages.pages.dev |