Workers KV

Store and serve data at the edge

Workers KV is a serverless key-value store that allows you to store, modify, and query data across Cloudflare's globally distributed network quickly and securely. This enables you to improve response times, enforce custom authorization, and create targeted experiences. With automatic scaling, Workers KV supports applications of any size, from dozens to millions of users.
Global Edge Storage

Store, modify, and query key-value data across Cloudflare's globally distributed network quickly and securely, with automatic scaling supporting applications of any size.

Low Latency Data Access

Reduce latency when values are stored and read across Cloudflare's global network, with the ability to set customized TTLs to avoid serving stale values.

Reliable and Secure

KV replicates data automatically to avoid a single point of failure, providing a reliable and secure key-value store with zero downtime recovery from failures.

Workers KV Overview

Serverless key-value storage for applications on Cloudflare

Faster
Slower
Background Pattern

You can use Workers KV to:

Discover how Workers KV enables fast, secure, and scalable data storage and retrieval at the edge for various use cases.

Get Started with Workers KV

Enforce Custom Authorization and Authentication

Store session tokens or other user information to quickly ensure the right user has access to the right content. Move the authentication layer out of applications and into the network, reducing the threat of application-level authentication vulnerabilities while improving performance.

Block Malicious Actors

Stop cheaters, spammers, trolls, and other attackers by storing IPs, user IDs, or any relevant data in Cloudflare Workers KV. Easily write to and run quick checks against large block lists to prevent attackers from reaching protected applications and posting, registering, or performing other undesired actions.

Improve Response Times Everywhere

Reduce latency when values are stored and read across Cloudflare’s global network. Workers-KV automatically replicates data to all of Cloudflare’s global locations, allowing you to scale seamlessly.

Create Targeted Experiences

Generate customized content instead of serving static sites. Serve unique content to returning visitors, target marketing to subsets of visitors, or store user preferences. Quickly modify, cached or uncached content, with low latency injection of personalized content from Workers KV.

Store and serve data at the edge with Workers KV

Explore code examples for using Workers KV in your applications

Background Pattern
export default {
  async fetch(request, env) {
    const userId = request.headers.get('User-ID');
    const userPrefs = await env.KV.get(userId, 'json');
    if (userPrefs) {
      // Use userPrefs to personalize content
    }
  }
}
Leagued

"

Choosing Cloudflare as our serverless provider was a no-brainer. Workers KV took just 15 minutes to get up and running. The ability to quickly spin up a Worker, deploy it to production, and scale effortlessly has been invaluable. "

Sammi Sinno CEO

Build without boundaries

Join thousands of developers who've eliminated infrastructure complexity and deployed globally with Cloudflare. Start building for free — no credit card required.