Cloudflare Docs
D1
Visit D1 on GitHub
Set theme to dark (⇧+D)

Cloudflare D1

Create new serverless SQL databases to query from your Workers and Pages projects.
Available on all plans

Built on SQLite, D1 is Cloudflare’s first queryable relational database. Create a database by importing data or defining your tables. Write queries within a Worker or Pages project.

With D1, you can interact with and push changes to your database directly through Wrangler, create and modify your database directly from the Cloudflare dashboard, store backups of your database in R2 and export your backups to download to your local machine.

​​ Features

​​ Wrangler

Manage your database with Workers. The Workers command-line interface, Wrangler, allows you to create, test, and deploy your Workers.

​​ Workers

Build serverless applications and deploy instantly across the globe for exceptional performance, reliability, and scale.

​​ Pages

Deploy dynamic front-end applications.

​​ Coming soon

  • Larger databases: During the alpha period, database size is limited to 100 MB. We plan to support larger databases in the future. If your use case requires a larger database, complete the Limit Increase Request Form and we will contact you.

  • Read replication: D1 will create and distribute read-only clones of your data across the Cloudflare global network. Cloudflare distributes your data close to where your users are and keeps your read-only clones up to date with changes.

  • Transactions: Define a chunk of your Worker code that runs directly next to the database, giving you total control and maximum performance. Each request first hits your Worker near your users. Depending on the operation, your Worker can hand off to another Worker deployed alongside a replica, or your primary D1 instance, to complete its work.

​​ More resources