Store small configuration values and metadata in organization-owned namespaces. Workers use Wrangler’s KV binding contract. Each value is limited to 64 KiB; use Object storage for images, files, and large documents.
Create and bind a namespace
Create a namespace in Data → Key-value in the tenant console, or use Wrangler after configuring your connection:
npx wrangler kv namespace create SETTINGSCopy the returned namespace ID into the Worker configuration:
[[kv_namespaces]]
binding = "SETTINGS"
id = "<namespace-id>"Deploy with Wrangler, then use the binding:
await env.SETTINGS.put("theme", JSON.stringify({ color: "blue" }), {
expirationTtl: 3600,
});
const theme = await env.SETTINGS.get("theme", "json");
const keys = await env.SETTINGS.list({ prefix: "theme" });
await env.SETTINGS.delete("theme");The platform validates namespace ownership when binding and executing requests. Another organization’s namespace ID does not grant access to its values.
Browse and manage values
Open a namespace to browse keys by prefix, inspect UTF-8 values and JSON metadata, and review expiration and activity. Read-write users can manage values and rename or delete the namespace. Deletion removes its contents and breaks Workers that still bind it; review the target before confirming.
Limits and persistence
Usage & limits tracks namespaces, live keys, stored-value bytes, and period operations. Writes reserve growth before committing. Deletion and expiration return holding capacity. Reads, writes, deletes, and lists consume operations.
Data is durable on the selected service host. This is a single-region service without automatic replication or failover; it does not reproduce Cloudflare’s globally distributed KV cache. Check Usage and quotas for current allowances.