About Cloudflare D1
Cloudflare D1 is Cloudflare's managed, serverless SQL database, based on SQLite. Developers create databases and query them from Cloudflare Workers and Pages projects, so applications get a relational store without running database servers.
The documentation covers a Workers binding API with prepared statements, SQL features such as foreign keys and JSON queries, Wrangler commands, a REST API, import and export of data, indexes and local and remote development. Additional features include Time Travel and backups and a beta of global read replication. Example guides show how to query D1 from Hono, Remix, SvelteKit and Python Workers.
D1 is a proprietary Cloudflare service and is available on both Free and Paid plans, with billing and pricing described in the documentation.
Key features
- SQLite-based serverless SQL database
- Queries from Workers and Pages
- Time Travel and backups
- Global read replication in beta
- Wrangler CLI and REST API
- Import and export of data
Good fit for
- →Relational storage for edge applications
- →Small SQL databases for Workers projects
- Tags
- sqlite
- serverless
- cloudflare
- sql
- edge
- workers
- database
Open-source alternatives to Cloudflare D1
See all
rqlite
Databases
The lightweight, fault-tolerant database built on SQLite. Designed to keep your data highl
MITvs Cloudflare D1★ 18k
libSQL
Databases
libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
MITvs Cloudflare D1★ 17k
ClickHouse
Databases
ClickHouse is a fast open-source column-oriented database management system that allows ge
Apache-2.0vs Snowflake★ 50k
DuckDB
Databases
DuckDB is an analytical in-process SQL database management system
MITvs MotherDuck★ 42k
TiDB
Databases
TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and nati
Apache-2.0vs Amazon Aurora★ 41k
SurrealDB
Databases
A scalable, distributed, collaborative, document-graph database, for the realtime web
OSSvs MongoDB Atlas★ 33k
SaaS alternatives to Cloudflare D1
See all
PlanetScale
Databases
Managed MySQL and Postgres with branching workflows and online schema changes
SaaS
Upstash
Databases
Serverless Redis, Kafka and vector database with per-request pricing
SaaS
Aiven
Databases
Managed service for running Postgres, MySQL, Kafka and other data systems in the cloud
SaaS
MongoDB Atlas
Databases
Managed MongoDB service across AWS, Azure and Google Cloud
SaaS
Momento
Databases
Serverless cache and pub/sub service with no infrastructure to manage
SaaS
Amazon Aurora
Databases
AWS cloud-built relational database compatible with MySQL and PostgreSQL
SaaS

