vs

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

overview
Primary model
Relational
Relational
Also supports
Document
Document
Type
Managed service
Embedded library
Status
Active
Active
Developer
Cloudflare
D. Richard Hipp / Hwaci (SQLite Consortium)
First release
2022
2000
Latest version
–
3.54.1 (Oct 16, 2026)
License
ProprietaryProprietary (Cloudflare service)
Open source (permissive)Public Domain
Free tier
✓
✓
popularity
WhichDB Score
5.8
75.5
Rank
#373
#5
GitHub stars
–
10.8K
Stack Overflow questions
–
94.9K
scale & guarantees
Comfortable data size
Small (≤ 100 GB)
Small (≤ 100 GB)
Horizontal scaling
Manual
None
Multi-region
Read replicas
None
ACID
Full
Full
Consistency
Strong, Causal
Strong
Schema
Strict
Flexible
Architecture
Serverless, Primary replica
Embedded, Single node
deployment
Self-hosted
—
✓
Vendor-managed cloud
✓
—
Serverless
✓
—
Embedded
—
✓
Edge
✓
✓
Clouds
Cloudflare
–
capabilities
Transactions
✓
✓
Joins
✓
✓
Secondary indexes
✓
✓
Full-text search
✓
✓
Vector search
—
—
Geospatial
—
—
JSON
✓
✓
Change data capture
—
—
Triggers
✓
✓
Stored procedures
—
—
Materialized views
—
—
TTL / expiry
—
—
Pub/Sub
—
—
Columnar storage
—
—
In-memory
—
✓
Durable persistence
✓
✓
Compression
—
—
Encryption at rest
✓
—
Role-based access
—
—
Time travel
✓
—
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
✓
interfaces
Query languages
SQL
SQL
Client languages
JavaScript, TypeScript, Python, Rust
C, Python, Java, JavaScript, Go, Rust, C#, Swift
Best for
OLTP, Edge, Content, Coordination
Embedded, Mobile/offline, Edge, Local-first

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.