Cloudflare D1 vs SQLite
Cloudflare D1: Serverless SQLite for Cloudflare Workers, priced per row read and written, with read replicas and time travel. SQLite: The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.
key differences
- Licensing: Cloudflare D1 is proprietary (Proprietary (Cloudflare service)); SQLite is open source (permissive) (Public Domain).
- Horizontal scaling is manual in Cloudflare D1 and none in SQLite.
- Only Cloudflare D1 has encryption at rest, time travel.
- Only SQLite has in-memory, runs in webassembly.
- Cloudflare D1 has a serverless option; SQLite does not.
- SQLite can run embedded in your application process.
choose cloudflare-d1 for
- +Database-per-tenant SaaS on Workers
- +Edge apps, blogs and CMS backends
- +Configuration and feature metadata near users
- +Prototypes needing SQL without managing servers
best at · OLTP, Edge, Content
choose sqlite for
- +Mobile and desktop application storage
- +Embedded devices and IoT
- +Local-first apps and offline caches
- +Test fixtures and data interchange files
best at · Embedded, Mobile/offline, Edge
Cloudflare D1 vs SQLite: FAQ
What is the difference between Cloudflare D1 and SQLite?
Cloudflare D1: Serverless SQLite for Cloudflare Workers, priced per row read and written, with read replicas and time travel. SQLite: The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers. Licensing: Cloudflare D1 is proprietary (Proprietary (Cloudflare service)); SQLite is open source (permissive) (Public Domain). Horizontal scaling is manual in Cloudflare D1 and none in SQLite. Only Cloudflare D1 has encryption at rest, time travel.
When should I choose Cloudflare D1 over SQLite?
Choose Cloudflare D1 for database-per-tenant SaaS on Workers; edge apps, blogs and CMS backends; and configuration and feature metadata near users. Choose SQLite for mobile and desktop application storage; embedded devices and IoT; and local-first apps and offline caches.
Is Cloudflare D1 or SQLite more popular?
SQLite ranks #5 on the WhichDB Score (75.5/100) and Cloudflare D1 ranks #373 (5.8/100). Popularity is not fit: check the requirements that matter for your project.
Are Cloudflare D1 and SQLite open source?
No. Cloudflare D1 is proprietary, closed-source software. Yes. SQLite is open source. License: Public Domain.