
Cloudflare R2
Usage BasedZero-egress object storage that speaks S3.
Published 12 October 2026
Scores
Popularity3/5
Well known among web developers and the usual S3 alternative in comparisons, but outside the Cloudflare and JavaScript ecosystem it is far less recognized than Amazon S3.
Learning Curve2/5
Anyone who has used an S3 SDK can start immediately by pointing it at the R2 endpoint, and the dashboard covers bucket creation, public access, and keys without extra concepts.
Flexibility3/5
Covers uploads, public delivery, lifecycle rules, and events, but with fewer storage classes and a narrower slice of the S3 API than Amazon S3.
Performance4/5
Served from Cloudflare's global network with native Worker bindings and no egress penalty for read-heavy workloads.
Portability5/5
The S3-compatible API means data and client code move to or from other providers with little change, and there is no egress cost to leave.
About Cloudflare R2
Cloudflare R2 is an S3-compatible object storage service for files that live outside your database: user uploads, images, documents, exports, and backups. Existing S3 SDKs and tools work by changing the endpoint and credentials, so an app written for Amazon S3 can usually move over without a rewrite.
The defining trait is no egress fees. Reading data out of R2 over the S3 API, through a Worker, or through a public bucket costs nothing, and only storage and operations are billed. That removes the bandwidth surprise that makes serving large or popular files from a hyperscaler expensive.
Buckets can be reached from your own backend with an S3 client, from a Cloudflare Worker through a native binding, or directly from a browser with presigned URLs. Public buckets can be served on a custom domain behind Cloudflare's CDN, and an Infrequent Access storage class lowers the cost of rarely read data. Event notifications, lifecycle rules, and Super Slurper migration from other S3 providers are included.
R2 works with any host or framework, so it is not tied to Cloudflare Workers or Pages. A Next.js, Django, or FastAPI app on any platform can use it through the S3 API, keeping the access keys on the server.
Key Features
- S3-compatible API that works with existing AWS SDKs and tools
- No egress fees for reads over the S3 API, Workers, or public buckets
- Native Workers bindings for low-latency access from Cloudflare Workers
- Presigned URLs for direct browser uploads and downloads
- Public buckets on custom domains served through Cloudflare's CDN
- Infrequent Access storage class for rarely read data
- Event notifications and lifecycle rules for automation and cleanup
- Super Slurper migration from other S3-compatible providers
Pros
- No egress charges, so serving large or viral files stays predictable
- Drop-in S3 compatibility keeps migration from Amazon S3 simple
- Standard storage is cheaper per GB than Amazon S3 Standard
- Generous free tier covers small apps and prototypes
- Public buckets pair with Cloudflare's CDN and custom domains
Cons
- S3 API coverage is partial, and some features such as certain bucket policies and object tagging are missing
- Fewer storage classes and archival tiers than Amazon S3
- Smaller ecosystem of third-party integrations than S3
- Best features, such as Workers bindings, assume you use the Cloudflare platform
Cloudflare R2 Pricing
Usage Based- · 10 GB of Standard storage per month
- · 1 million Class A and 10 million Class B operations per month
- · Unlimited free egress
- · $0.015 per GB-month of storage
- · $4.50 per million Class A (write) operations
- · $0.36 per million Class B (read) operations
- · No egress fees
- · $0.01 per GB-month of storage plus $0.01 per GB retrieved
- · 30-day minimum storage duration
- · Higher operation prices than Standard
Tech Stacks with Cloudflare R2
MERN Stack
ProjectMongoDB, Express, React, Node.js: the classic JavaScript full-stack. A well-trodden path with massive community support and job-market demand.
Frontend
Programming
Databases
Hosting
Authentication
Next.js + PostgreSQL
ProjectFull-stack Next.js app on PostgreSQL (self-managed or a serverless host like Neon), with Clerk, Auth0, or BetterAuth for auth, deployed to Vercel or a container host like Railway.
Programming
Databases
Hosting
Authentication
Python Web (FastAPI + React)
ProjectA clean separation of concerns: React on the frontend, FastAPI serving a typed REST API, and PostgreSQL for persistent storage (MySQL, MariaDB, and serverless Postgres hosts are also available). Docker keeps environments consistent.
Tools Related to Cloudflare R2
Integrates with Cloudflare R2(1)
R2 buckets attach to a Cloudflare Worker through a native binding, so Worker code reads and writes objects without S3 credentials or an HTTP round trip.
Alternatives to Cloudflare R2(3)
R2 speaks the S3 API with no egress fees and cheaper storage per GB; Amazon S3 has more storage classes, regions, and AWS integrations. Pick R2 to serve files cheaply, S3 for the broadest feature set.
R2 uses the portable S3 API, has no egress fees, and works from any host. Vercel Blob has a proprietary SDK but the fastest setup for a Next.js app on Vercel, with client uploads built in.
Both are S3-compatible and cheaper than Amazon S3. R2 charges nothing for egress and integrates with Workers; Backblaze B2 has lower per-TB storage prices and suits backups and archives.