Cloudflare D1 Free Tier: 5M Reads/Day, 100k Writes, 5 GB (2026)

Cloudflare D1's free plan: 5 million row reads per day, 100,000 writes, 5 GB storage. What happens when you cross the limits, and when the $5 paid floor wins.

Huifer
Huifer
October 29, 202610 min read
Also available in:Deutsch · 中文

Written by Huifer, solo developer and maintainer of TanStack Ship.

I answer Cloudflare D1 cost questions more often than any other infrastructure question, and the one that keeps coming back is the free tier: what exactly does "5 million" cover, what resets daily, and what happens the day a project outgrows it. This page is the ground-level answer — Cloudflare's published numbers, gathered in one place, with the arithmetic done honestly and nothing extrapolated beyond what the docs state. When a number here is my calculation rather than a published figure, I say so.

Verified sources: D1 pricing · D1 limits · D1 FAQ · Workers pricing · TanStack · web.dev · Cloudflare Developers

Last updated: 2026-10-29 · Changelog

Cloudflare D1 Free Tier: 5M Reads/Day, 100k Writes, 5 GB (2026)

Cloudflare D1's free tier includes 5 million row reads per day, 100,000 rows written per day, and 5 GB of total storage on the Workers Free plan, per Cloudflare's D1 pricing page. Three clarifications immediately: the 5 million is a daily allowance, not monthly; reads are measured in rows scanned, not queries; and the 5 GB storage bucket is shared across all databases in the account, with a separate 500 MB per-database cap on the free plan. If you cross the daily read or write allowance, queries start failing until the counter resets at 00:00 UTC or you move to the Workers Paid plan.

This article is for developers deciding whether a production workload can live on the free tier, and for buyers evaluating whether an edge-hosted SaaS can start at $0/month. If you need the full monthly arithmetic — including the paid plan's included allowances and overage rates — the decision page is the Cloudflare D1 pricing cost breakdown, and the framework-level decision (D1 vs. hosted Postgres) is covered in D1 vs. Supabase compared.

TL;DR

  • Reads: 5 million rows read per day, free. Resets at 00:00 UTC. Measured from Cloudflare's pricing page.
  • Writes: 100,000 rows written per day, free. Same daily reset.
  • Storage: 5 GB total across the account; each individual database is capped at 500 MB on the free plan.
  • Databases: the free plan allows fewer databases per account than paid — check the current limits table before planning multi-tenant schemas.
  • Over the daily limit: queries return errors until reset — the D1 FAQ is explicit that this is the free-plan behavior; the paid plan removes the daily cap.
  • Paid floor: Workers Paid is $5.00/month minimum, which unlocks far larger included allowances (25 billion reads/month) — see the full cost breakdown.

Cloudflare D1's free tier (Workers Free plan) includes 5 million rows read per day, 100,000 rows written per day, and 5 GB of total storage across all databases in the account. Limits reset daily at 00:00 UTC. Crossing the daily read or write allowance causes queries to return errors until reset; the 500 MB per-database size cap on the free plan is a hard structural limit, not a metered overage.

What "5 Million" Actually Counts: Free Plan Allowances, One by One

5 million rows read per day

A "row read" is counted per row scanned, not per row returned, and not per query. One SELECT with an unindexed WHERE clause can scan thousands of rows and count each one against the daily allowance. This distinction is the single most common source of surprise: an app that "only" serves 20,000 queries a day can burn 5 million row reads if each query scans 250 rows. The D1 FAQ and pricing page both document this scanning-based measurement.

The practical consequence: index design is a cost-control mechanism even at $0/month. An index that collapses a 250-row scan into a 5-row scan multiplies your effective daily budget by 50.

100,000 rows written per day

Every INSERT, UPDATE, and DELETE counts. At 100k writes/day you have roughly 1.16 writes per second sustained around the clock — fine for most CRUD apps, tight for anything that logs an event row per request or maintains counters. Churn-heavy tables (audit logs, activity feeds, analytics counters) are the first thing that outgrows this allowance.

5 GB total storage, 500 MB per database

Two separate caps, easily confused:

CapFree plan valueScope
Total storage5 GBSum of all databases in the account
Per-database size500 MBEach individual database

So on the free plan you can hold 5 GB in total, but no single database may exceed 500 MB — meaning the free tier effectively requires splitting data across at least 10 databases if you ever want to use the full 5 GB. Most projects never get near this, but multi-tenant designs that put each customer in one database hit the 500 MB wall first.

Database count and the Workers envelope

The free plan also limits how many D1 databases an account can create; the exact numbers live in the D1 limits table and change periodically, so I link rather than restate them. And D1 never runs alone: every query passes through a Worker, so the Workers Free plan's 100,000 requests per day is a second, independent ceiling on the same architecture.

What Happens When You Cross the Daily 5 Million

The D1 FAQ is direct about free-plan behavior: queries start returning errors once a daily allowance is exhausted, until the counter resets at 00:00 UTC. There is no graceful degradation and no automatic paid fallback — a request that lands after the allowance is spent simply fails. For a side project that means a quiet evening of failed requests; for a product with real users it means an outage you didn't schedule.

This is the key asymmetry between the two plans:

  • Free plan: daily hard caps. Exceed them → errors until 00:00 UTC.
  • Workers Paid: no daily caps; usage draws from large monthly included allowances and is billed per-unit only past them.

The structural question is therefore not "can I afford D1?" but "can my traffic shape survive a daily guillotine?"

sql
-- The kind of query that quietly burns the free allowance.
-- Unindexed filter: scans every row in users on every call.
SELECT id, email FROM users WHERE plan = 'free' AND last_seen_at > ?1;

-- The fix that keeps you inside 5M rows/day:
CREATE INDEX idx_users_plan_last_seen ON users (plan, last_seen_at);
-- Same query now scans only the matching rows.

My one-sentence decision rule, from watching these limits in real projects: if your write volume is bounded by human actions (signups, orders, posts), 100k/day is generous; if it's driven by machine events (logging every request, updating counters), the free tier is the wrong plan regardless of reads.

How to Tell If 5 Million Daily Reads Is Enough for Your Workload

You don't have to guess — D1 reports the counters for every query. The meta object on each result exposes rows_read and rows_written for that statement, which is the documented way to attribute usage to specific queries (the same numbers appear in the dashboard's metrics and the GraphQL Analytics API).

typescript
// Log scan volume per query so daily budget burn is visible in staging,
// not discovered in production.
const result = await env.DB.prepare(
  "SELECT id, email FROM users WHERE plan = ?1 AND last_seen_at > ?2"
).bind(plan, cutoff).all();

const scanned = result.meta?.rows_read ?? 0;   // rows scanned = units of free allowance spent
const returned = result.results.length;         // rows the app actually saw

if (scanned > returned * 10) {
  console.warn(`unindexed scan: read ${scanned} rows to return ${returned}`);
}

A quick back-of-envelope check, using Cloudflare's published allowances as inputs:

Workload signalRough free-tier fitBasis
≤ ~100k queries/day, each scanning ≤ 50 rowsComfortable~5M rows scanned/day
~20k queries/day, unindexed scans of ~250 rowsAt the edge~5M rows scanned/day
Write rows driven by per-request event loggingOver budget quickly100k writes/day
One DB > 500 MB, free planBlocked structurallyper-database cap
Spike traffic without cacheRiskydaily caps reset at 00:00 UTC only

Every row above is calculated from the published free-tier numbers, not from my own traffic measurements — your query patterns are the variable.

Free Plan vs. Workers Paid: The Real Decision Is the Floor

Here is the part the "free 5 million" framing hides: the paid plan is not a metered leap. The Workers Paid plan has a $5.00/month subscription minimum, and that subscription already includes D1 allowances so large that a 10-million-reads-per-month workload bills $0.00 in D1 usage — the first 25 billion rows read per month are included. My calculated illustration: even if those 10M monthly reads had been billable at the published per-million rate, they would cost $0.01.

So the upgrade decision is really:

  1. You hit a daily cap in production → upgrade, because the paid plan removes daily caps.
  2. You need > 500 MB in one database → upgrade, because the per-database cap is a structural limit.
  3. You want headroom while iterating → $5/month is the cheapest realistic production floor for a Workers + D1 stack.
  4. Pure hobby project, bursty human traffic → stay free; just add the index discipline and logging above.

In other words, "5 million free" is the evaluation tier, and $5/month is the production tier — there is no meaningful per-unit cliff between them. The complete monthly arithmetic, overage rates, and worked examples are in the D1 pricing cost breakdown.

What This Means for the Template Buyer Decision

This article supports a specific buyer decision, not a generic pitch: when you choose a SaaS boilerplate, the database it ships on determines whether your infrastructure starts at $0, $5, or $30+ per month before you have a single customer. A D1-based edge stack can genuinely begin free and step up to a $5 floor; a stack that requires hosted Postgres starts metering from day one.

That is a capability worth checking in any template you evaluate:

  • Does the template target Cloudflare Workers + D1, where the free tier and the $5 paid floor apply as described here?
  • Does its data layer make row-scan cost visible (the meta.rows_read discipline above), or does it hide scan volume behind an ORM abstraction?
  • Does its schema design respect the 500 MB per-database structural cap, or would multi-tenant growth force a migration?

When I evaluate templates — including my own TanStack Ship templates, which are built on the Workers + D1 stack this article describes — these are the questions I check first, because they decide the monthly bill more than any headline feature. The broader decision framework, comparing what each SaaS boilerplate includes and what infrastructure it commits you to, is the best SaaS boilerplate for 2026 comparison. If you want the counterfactual — what hosted Postgres costs at the same traffic — the honest comparison is D1 vs. Supabase.

Limitations and Honest Disclosure

  • No material connection to Cloudflare. I am a Cloudflare customer and pay for Workers Paid in my own projects; nothing here is sponsored, and no Cloudflare figure is quoted beyond what their public docs state.
  • I do sell the product mentioned. TanStack Ship is my commercial template product, so weigh the "what this means for buyers" section accordingly — the D1 facts stand on Cloudflare's documentation regardless.
  • All numbers here are Measured from Cloudflare's published pages (pricing, limits) as of 2026-10-29, or Calculated by me from those numbers and labeled as such. I have not re-verified every limit on every plan tier against the live dashboard on this date; if Cloudflare has changed a figure since their docs were last updated, their page wins over mine.
  • No proprietary traffic data is cited. The workload-fit table is arithmetic from public allowances, not measured customer traffic — I can't tell you your scan pattern, only how to measure it.
  • Cloudflare adjusts limits periodically. Before committing an architecture, confirm the current numbers on the official pages linked above.

Conclusion and Next Step

In one sentence: D1's free tier gives you 5 million scanned rows per day, 100,000 writes per day, and 5 GB total storage (500 MB per database) — enough to build and validate on, with daily caps that make the $5/month Workers Paid plan the real production floor rather than a metered risk.

Your next step depends on where you are: if you're costing an edge stack, compare what production SaaS templates include and what infrastructure they commit you to in the 2026 SaaS boilerplate comparison; if you're already on Cloudflare, preview a template built on Workers + D1 in the template gallery.

Last updated: 2026-10-29. Prices and limits reflect Cloudflare's published documentation on that date and are subject to change by Cloudflare.