Cloudflare R2
S3-compatible object storage with no egress fees. Store and serve files globally.
Best for developers who want S3-compatible storage without surprise egress fees.
Use Cases
Free Tier
10GB storage, 1M class A ops/month, 10M class B ops/month
How to Maximize the Free Tier
R2's no-egress-fee model makes it ideal for serving user-uploaded content directly to users — something that would cost a fortune on S3. The 10GB free storage fills faster than you'd expect with images and files, so set aggressive upload limits and compress before storing. Use R2's S3-compatible API with the same SDKs you already use for S3 — just change the endpoint URL. The 10M class B operations/month is very generous for read-heavy workloads.
Getting Started
Sign up → create bucket → generate R2 API token → use S3-compatible SDK (`AWS_S3_ENDPOINT_URL` = R2 endpoint) → upload files → files served directly from R2 or via Cloudflare CDN with no egress charges.
Pros
- No egress fees: The killer feature — unlike AWS S3, Cloudflare R2 charges zero egress fees for data transfer out
- S3 compatible: Drop-in replacement for S3 — use the same SDKs, libraries, and tools you already know
- Operation allowance: 10 million class B operations per month on the free tier — generous for read-heavy workloads
Cons
- Storage limit: 10GB storage on the free tier is modest — fills quickly for media-heavy applications or backups
- Region options: Limited region selection compared to AWS S3 — fewer options for geo-specific data residency
- No cold storage: No lifecycle policies or Glacier-like cold storage tiers for archiving infrequently accessed data