Cloudflare D1 vs Turso vs SQLite Cloud (2026)
SQLite at the edge is one of the biggest database trends in 2026. Three platforms compete: Cloudflare D1 (deep Cloudflare integration), Turso (global replication), and SQLite Cloud (managed SQLite). Here's the comparison.
Quick Verdict
- Cloudflare D1 — Best for Cloudflare ecosystem. Tightly integrated with Workers.
- Turso — Best for global reads. Embedded replicas. Works anywhere.
- SQLite Cloud — Best for traditional SQLite hosting with real-time features.
Pricing
| Cloudflare D1 | Turso | SQLite Cloud | |
|---|---|---|---|
| Free tier | 5GB, 5M reads/day | 9GB, 25M reads/mo | 1GB, limited |
| Paid | $0.75/M reads, $1/M writes | $29/mo (Scaler) | $19/mo |
| Storage | $0.75/GB/mo | Included in plan | Included in plan |
D1 is cheapest for Cloudflare users (included in Workers pricing). Turso has the most generous free tier for general use.
Architecture
Cloudflare D1
SQLite database that lives on Cloudflare's network. Designed to work with Workers. Reads are served from replicas near the user. Writes go to the primary.
Turso
Built on libSQL (SQLite fork). Databases replicate to 30+ global locations. Killer feature: embedded replicas (sync a local SQLite copy into your app runtime).
SQLite Cloud
Managed SQLite with real-time subscriptions and Pub/Sub. More traditional hosting model with added collaboration features.
Features
| Feature | D1 | Turso | SQLite Cloud |
|---|---|---|---|
| Global replication | ✅ Auto | ✅ 30+ regions | ❌ Limited |
| Embedded replicas | ❌ | ✅ Best | ❌ |
| Multi-database | ✅ | ✅ (thousands) | ✅ |
| Real-time subscriptions | ❌ | ❌ | ✅ |
| Drizzle support | ✅ | ✅ | ✅ |
| Prisma support | ✅ | ✅ (experimental) | ✅ |
| Workers integration | ✅ Native | Via HTTP | Via HTTP |
| Edge runtime | ✅ Workers only | ✅ Any runtime | ❌ |
| Branching | ❌ | ✅ | ❌ |
| Time travel | ✅ (30 days) | ❌ | ❌ |
Developer Experience
Cloudflare D1
// In a Cloudflare Worker
export default {
async fetch(request, env) {
const { results } = await env.DB.prepare(
'SELECT * FROM users WHERE id = ?'
).bind(userId).all()
return Response.json(results)
},
}
Bound to Workers via wrangler.toml. Zero network latency from Worker to D1.
Turso
import { createClient } from '@libsql/client'
const db = createClient({
url: process.env.TURSO_DATABASE_URL,
authToken: process.env.TURSO_AUTH_TOKEN,
})
const result = await db.execute('SELECT * FROM users WHERE id = ?', [userId])
Works anywhere — Vercel, Cloudflare, Deno, Node.js.
With Embedded Replicas (Turso)
const db = createClient({
url: 'file:local-replica.db', // Local SQLite file
syncUrl: process.env.TURSO_DATABASE_URL, // Sync from cloud
authToken: process.env.TURSO_AUTH_TOKEN,
})
await db.sync() // Pull latest from cloud
const result = await db.execute('SELECT * FROM users') // 0ms latency!
When to Use Each
Choose Cloudflare D1 When
- Building on Cloudflare Workers
- Want tightest possible integration
- Need time travel (point-in-time recovery)
- Already in the Cloudflare ecosystem
Choose Turso When
- Need global read replication
- Want embedded replicas (zero-latency reads)
- Building multi-tenant apps (database per tenant)
- Need to work across multiple platforms (not just Cloudflare)
- Want database branching
Choose SQLite Cloud When
- Need real-time subscriptions to data changes
- Want managed SQLite without edge requirements
- Building collaborative features
- Simpler use cases without global distribution
FAQ
Can I use D1 outside of Cloudflare Workers?
D1 is accessible via REST API, but it's designed for Workers. Using it elsewhere adds latency and complexity.
Turso vs Neon?
Turso: edge SQLite with embedded replicas. Neon: serverless PostgreSQL with branching. Use Turso for edge reads and multi-tenant. Neon for complex queries and PostgreSQL ecosystem.
Is SQLite good enough for my app?
For read-heavy workloads with moderate writes: absolutely. SQLite handles millions of reads per second. The limitation is single-writer.
Bottom Line
Cloudflare D1 for Workers-native apps. Turso for global reads with embedded replicas (works anywhere). SQLite Cloud for managed SQLite with real-time features. Most developers: Turso if you need edge SQLite, D1 if you're all-in on Cloudflare.