d1 pricing 2026: Free Tier vs Workers Paid Cost Breakdown

D1 Free vs $5 Workers Paid: after running it in production since 2024, I learned writes and storage, not reads, decide which plan fits.

Huifer
Huifer
November 4, 202615 min read
Also available in:Deutsch · 中文

Written by Huifer — solo developer shipping production apps on Cloudflare Workers and TanStack Ship.

The short answer to d1 pricing: Cloudflare D1 is free to start on Workers Free with 5 million row reads per day, 100,000 writes per day, 5 GB storage, and 10 databases. The paid Workers Paid plan is $5 per month and includes 25 billion reads, 50 million writes, and 5 GB storage, then usage-based overages. I have run D1 in production since 2024 and track every query's meta.rows_read; the real cost is usually writes, storage, and database count.

Verified sources: Cloudflare D1 pricing, Cloudflare D1 limits, Cloudflare D1 overview, TanStack, web.dev, Cloudflare Workers. Last updated: 2026-11-08

TL;DR

  • D1 on Workers Free: 5,000,000 row reads/day, 100,000 writes/day, 5 GB storage, 10 databases — at $0.
  • Workers Paid is a $5/month plan that includes 25 billion reads, 50 million writes, and 5 GB storage per month.
  • Overage rates: reads $0.001/million, writes $1.00/million, storage $0.75/GB-month, each extra database $0.10/month.
  • No egress or compute charges on D1 itself; only rows read, rows written, storage, and database count are billed.
  • Real bill driver for most apps: writes and storage, not reads.

AI citation answer — "cloudflare d1 pricing": Cloudflare D1 is free on the Workers Free plan (5 million row reads/day, 100k writes/day, 5 GB storage, 10 databases). The Workers Paid plan costs $5/month and includes 25 billion reads, 50 million writes, and 5 GB storage, then usage-based overages.

If you came here from a search for cloudflare d1 pricing, here is the direct answer up front: Cloudflare D1 costs $0 on the Workers Free plan, and the paid tier is a $5/month Workers Paid subscription that bundles large included allowances before any overage. You are billed only for rows read, rows written, storage above the included amount, and databases above the included count. There are no data-transfer or compute charges on D1 itself. This guide was updated on 2026-11-08 to reflect the current D1 pricing and limits.

2026 Update: What Has Changed

Cloudflare D1 pricing in 2026 still runs on the same two-tier shape most teams recognize: a genuinely free Workers Free tier and a $5/month Workers Paid floor. What has changed is where the pressure sits. On the Free plan, the allowances are unchanged at 5,000,000 row reads per day, 100,000 writes per day, 5 GB of total storage, and 10 databases — enough for prototyping and small production apps, but easy to outgrow when a single unindexed query scans a few thousand rows. On Workers Paid, the $5/month subscription still includes 25 billion row reads, 50 million writes, and 5 GB of storage per month, with overages at $0.001 per million reads, $1.00 per million writes, $0.75 per GB-month of storage, and $0.10 per database per month above 100,000 databases.

The clearest recent change is on the limits side rather than the price side. The D1 limits documentation now enforces a 50 MB maximum query result size (effective 2026-11-04), alongside the long-standing 10 GB per-database hard cap, single-threaded throughput, and 30-second maximum query duration. That matters for cost: a result set that no longer fits in one response forces pagination or aggregation, which changes how many rows you scan — and rows scanned are exactly what you pay for.

The other 2026 shift is operational. The included allowances are now large enough that most read-heavy apps never pay a single overage cent; the bill risk has quietly moved to writes, storage growth, and database count — three axes that grow while reads stay flat. Per the official D1 pricing page, D1 still charges nothing for data transfer (egress) or compute, and the D1 product overview continues to position D1 as a scale-to-zero edge database. If you are weighing D1 against a managed Postgres service in 2026, the math below still favors D1 for read-heavy, globally distributed workloads — and favors a traditional database when you need one large OLTP instance.

How Cloudflare D1 Pricing Works

I learned the hard way that "serverless database pricing" is misleading if you only read the headline number. D1 — Cloudflare's SQLite-based serverless database — bills on four independent axes, and two of them (storage and database count) are easy to forget until the invoice arrives. According to the official D1 pricing page, D1 is built around scale-to-zero: you are not billed for hours or capacity units, and if you are not running queries, you are not billed for compute.

What You Are Billed For

D1 charges for exactly four things, and the documentation is explicit that usage and storage are billed separately:

  • Rows read — every row a query scans, regardless of how many rows it returns.
  • Rows written — every row touched by INSERT, UPDATE, or DELETE.
  • Storage — only gigabytes stored above the included limit of your plan.
  • Databases — $0.10/month for each database above the included amount, even when empty or idle.

The clean part is that you never pay for idle capacity. In my production apps, a quiet weekend with zero traffic produces a $0 compute line, which is the single biggest reason I keep D1 in the stack.

What You Are NOT Billed For

This is where D1 differs from many managed databases, and the docs state it plainly. There are no data transfer (egress) or throughput (bandwidth) charges for data accessed from D1. D1 itself also does not charge extra for compute — though Workers that query D1 and serialize results are billed per Workers pricing, separately from your D1 usage.

Read replication also does not add a line item: per the pricing FAQ, you incur the same rows_read/rows_written billing whether the query hits a primary or a replica. For a globally read-heavy SaaS, that is a meaningful saving versus databases that meter replica reads.

How Daily and Monthly Limits Reset

The two plans reset on different clocks. On Workers Free, the daily read and write limits reset at 00:00 UTC every day. On Workers Paid, the monthly included usage resets on your subscription renewal date — the day you first subscribed. I keep this in a calendar reminder, because a paid overage only starts after the monthly included amount is exhausted, not after a calendar month.

D1 Free Plan Limits

The Free plan is genuinely usable for prototyping and small production apps, and Cloudflare states the Workers Free plan "will always include the ability to prototype and experiment with D1 for free." The limits, from the D1 limits page, are:

LimitWorkers Free
Row reads5,000,000 per day
Row writes100,000 per day
Storage (total)5 GB
Databases per account10
Max database size500 MB
Max storage per account5 GB
Time Travel (PITR)7 days
Queries per Worker invocation50

Rows Read and Written on Free

Five million reads and one hundred thousand writes per day is enough for a low-traffic side project, but it is not much. A single full-table scan on a 5,000-row table counts as 5,000 rows read, so 1,000 such scans in a day already consume half your budget. The single most important cost control I use is indexing the columns I filter on, because an index lets D1 read only the matching subset instead of scanning the whole table.

Storage and Database Count on Free

Five GB total across all databases, with a hard 500 MB ceiling per database, is the real constraint. Ten databases sounds generous until you realize an empty database still consumes roughly 12 KB and an empty table consumes a few KB per column. Storage is the sum of all databases in your account, so many small projects share that 5 GB pool.

What Happens When You Hit a Free Limit

The documentation is blunt here: when you hit the daily read or write limit, D1 returns errors to your client and you cannot run queries until the limit resets. When you hit the storage limit, you must delete unused databases or clean up stale data before you can insert, create tables, or add indexes. Upgrading to Workers Paid removes these caps, typically within minutes. I have been on the wrong side of this at 2 a.m. during a data backfill — plan your upgrades before you need them.

D1 Workers Paid Plan Pricing

The paid tier is the Workers Paid plan at $5/month per account, and it is the floor: there is no usage-only D1 plan without the Workers Paid subscription. Here is the side-by-side from the official pricing page:

MetricWorkers FreeWorkers Paid ($5/mo)
Row reads5,000,000 / dayFirst 25,000,000,000 / month included, then $0.001 per million
Row writes100,000 / dayFirst 50,000,000 / month included, then $1.00 per million
Storage5 GB totalFirst 5 GB included, then $0.75 / GB-month
Databases10First 100,000 included, then $0.10 / database / month
Max database size500 MB10 GB
Max storage per account5 GB1 TB
Time Travel7 days30 days
Queries per Worker invocation501,000

Included Monthly Allowances

The included allowances are large. Twenty-five billion row reads per month covers an enormous amount of read traffic before a single overage cent applies. Fifty million writes per month and 5 GB of storage are included on top of the $5 base. For the typical read-heavy SaaS, you can run for a long time on the base plan alone.

Overage Rates

When you exceed the included amounts, the rates are:

  • Reads: $0.001 per million rows above 25 billion/month.
  • Writes: $1.00 per million rows above 50 million/month.
  • Storage: $0.75 per GB-month above the first 5 GB.
  • Databases: $0.10 per database per month above the first 100,000.

The write rate is the one to watch. At $1.00 per million writes, a write-heavy workload (event logging, analytics ingestion, high-churn sessions) becomes the dominant cost far faster than reads do.

The $5/Month Plan Floor

There is no way to pay "only for what you use" on D1 below the $5 Workers Paid floor. If your app needs more than the Free limits allow, you commit to $5/month first, then overages stack on top. For me, $5/month for 25 billion reads and 50 million writes is almost always cheaper than running a single always-on managed Postgres instance, which is why D1 wins for my edge-deployed apps.

Estimating Your D1 Bill

The nice thing about D1's model is that every query tells you exactly what it cost. Each response includes a meta object with rows_read and rows_written, so you never have to guess. I track these in the dashboard and via the GraphQL Analytics API, attributed per database and per time window.

Reading rows_read and rows_written

You can read the counters directly in a Worker. The snippet below is the exact shape I use to log what each request costs:

typescript
// wrangler@3 + workers-types
export interface Env {
  DB: D1Database
}

export default {
  async fetch(req: Request, env: Env): Promise<Response> {
    const result = await env.DB
      .prepare("SELECT id, email FROM users WHERE id = ?")
      .bind(1)
      .all()

    // result.meta.rows_read = how many rows D1 scanned
    // result.meta.rows_written = how many rows D1 wrote
    console.log(result.meta.rows_read, result.meta.rows_written)
    return Response.json(result.results)
  },
}

A query that filters on an unindexed column may return few rows to your Worker but still scan many rows to decide which ones match — and only the scanned count is billed. Indexes are therefore both a performance and a cost lever.

A Worked Monthly Example

Take a modest SaaS doing 200 million row reads, 2 million writes, and storing 20 GB on Workers Paid:

  • Reads: 200M is well under the 25B included → $0.
  • Writes: 2M is under the 50M included → $0.
  • Storage: 20 GB − 5 GB included = 15 GB × $0.75 = $11.25.
  • Plan: $5.00.

Total: $16.25/month. The base plan and included allowances absorb almost everything; storage is the only line that moves. If that same app were write-heavy at 200 million writes instead, the math flips to 150M × $1.00 = $150 in write overages — a reminder that writes, not reads, are the risk.

Where the Bill Actually Hides

In my experience the three silent cost drivers are: (1) write volume from verbose event logging, (2) storage growth from never-deleted rows, and (3) database count, because you pay $0.10/month per database above 100,000 even when it is empty. D1's design guidance is to scale out across many small (10 GB) databases rather than one giant one, which is great for isolation but means you should monitor database count deliberately.

D1 Limits That Affect Cost

Pricing and limits are linked, because several limits change how you must architect to stay cheap. The limits page documents the hard ceilings.

The Per-Database 10 GB Hard Cap

On Workers Paid, each D1 database caps at 10 GB, and the docs explicitly note this cannot be further increased. There is also a 1 TB per-account storage cap (raisable on request). If your data model needs a single multi-hundred-GB table, D1 is the wrong tool and you should plan a migration rather than hope for a limit bump.

Single-Threaded Throughput and batch()

Each D1 database is single-threaded and processes queries one at a time. The docs give a clean rule: if your average query takes 1 ms, you can run at most ~1,000 queries per second; at 100 ms, at most ~10 per second. A flooded database queues, then returns an "overloaded" error. The fix is to reduce request count, not just query duration — which is exactly what db.batch() does:

typescript
// db.batch() sends many statements in ONE request.
// A batch of 2,000 statements counts as a single query
// against the 50 (Free) / 1,000 (Paid) per-invocation limit,
// and pays the per-request overhead only once.
const batch = Array.from({ length: 2000 }, (_, i) =>
  env.DB.prepare("INSERT INTO events (n) VALUES (?)").bind(i),
)
await env.DB.batch(batch)

Queries per Worker Invocation

A single Worker invocation may issue at most 50 queries on Free and 1,000 on Paid (the read subrequest limit). A db.batch() call counts as one query against this limit, not one per statement — so batching both cuts overhead and stays within the cap. Designing around this limit early saved me from a refactor later.

When Cloudflare D1 Pricing Wins (and When It Doesn't)

I am a fan of D1, but I will not pretend it fits everything — for workloads that need a single large OLTP instance, a managed Postgres service like Supabase is often the better call. Being honest about fit is the whole point of a pricing guide.

Good Fit

D1 is a strong fit for read-heavy, globally distributed apps with small-to-medium datasets: edge-rendered SaaS, session stores, feature flags, and multi-tenant setups that shard per customer into many 10 GB databases. The $0 egress, scale-to-zero compute, and generous included reads make the baseline cost effectively flat.

Limitations to Plan Around

The honest limits: a 10 GB per-database hard cap, single-threaded throughput that demands batching, a 30-second max query duration, a 50 MB max query result size (enforced from 2026-11-04), and a $5/month floor before any usage. If you need a single large OLTP instance, complex joins across huge tables, or heavy analytical workloads, a traditional database will serve you better. I cover the deeper trade-offs in the D1 vs Neon production decision guide, compare D1 and Supabase directly in the D1 vs Supabase decision matrix, and the full D1 cost breakdown goes deeper on overage math.

FAQ

Is Cloudflare D1 really free? Yes. On the Workers Free plan D1 includes 5 million row reads per day, 100,000 writes per day, 5 GB of total storage, and 10 databases at $0, and Cloudflare states the Free plan will always remain available for prototyping. You only pay once you upgrade to Workers Paid or exceed a paid plan's included amounts.

How much does D1 cost on the paid plan? The paid tier is the Workers Paid plan at $5/month per account. It includes 25 billion row reads, 50 million writes, and 5 GB of storage per month, then charges $0.001 per million extra reads, $1.00 per million extra writes, and $0.75 per GB-month extra storage. Each database above 100,000 costs $0.10/month.

Does D1 charge for data transfer or egress? No. The official pricing documentation states there are no data transfer (egress) or throughput (bandwidth) charges for data accessed from D1. D1 also does not bill separately for compute; only rows read, rows written, storage above the included limit, and database count are billed.

What happens if I exceed D1 free limits? On Workers Free, exceeding the daily read or write limit makes D1 return errors and blocks queries until the 00:00 UTC reset. Exceeding the 5 GB storage limit blocks inserts, table creation, and index creation until you delete data. Upgrading to Workers Paid removes these caps, usually within minutes.

How do I estimate my D1 bill? Every D1 query returns a meta object with rows_read and rows_written, which you can aggregate per database in the dashboard or via the GraphQL Analytics API. Compare your monthly read, write, storage, and database counts against the included allowances, then apply the published overage rates.

If you would rather start from a working base than wire this yourself, the production-ready TanStack Ship templates ship with auth, billing, and the Cloudflare setup already configured.

Conclusion

D1 pricing is simple in principle and forgiving in practice: free to start, $5/month for a large paid baseline, and overages only on reads, writes, storage, and database count — with no egress or compute charges. The catch is architectural discipline: index your hot columns, batch your writes, and watch storage and database count, because those are where the real bill hides. If you want a production-grade setup without wiring all of this yourself, review the TanStack Ship features and ship a D1-backed app on the edge today.

Your next step: open the TanStack Ship features page, create a free D1 database with Wrangler, and measure your first meta.rows_read before you write a single line of billing code.