← Back to articles

Cloudflare R2 vs AWS S3 vs Backblaze B2 (2026)

Object storage for files, images, backups, and media. The three real options are Cloudflare R2 (zero egress), AWS S3 (the standard), and Backblaze B2 (cheapest storage). Here's the comparison that matters: pricing.

Quick Verdict

  • Cloudflare R2 — Best value. Zero egress fees. S3-compatible.
  • AWS S3 — Most features. Best ecosystem. Expensive egress.
  • Backblaze B2 — Cheapest storage per GB. Good for backups.

Pricing (The Only Thing That Matters)

Cloudflare R2AWS S3Backblaze B2
Storage$0.015/GB/mo$0.023/GB/mo$0.006/GB/mo
Egress$0$0.09/GB$0.01/GB
PUT requests$4.50/M$5.00/M$0.004/1K
GET requests$0.36/M$0.40/M$0.004/1K
Free storage10GBNone (free tier: 5GB for 12mo)10GB
Free egressUnlimited100GB/mo (to internet)1GB/day

Real-World Cost Examples

1TB stored, 500GB egress/month:

  • R2: $15 + $0 = $15/mo
  • S3: $23 + $45 = $68/mo
  • B2: $6 + $5 = $11/mo

10TB stored, 5TB egress/month:

  • R2: $150 + $0 = $150/mo
  • S3: $230 + $450 = $680/mo
  • B2: $60 + $50 = $110/mo

The pattern: S3's egress fees dominate at scale. R2's zero egress is a massive advantage. B2 is cheapest for storage-heavy, low-egress use cases.

S3 Compatibility

All three are S3-compatible — use the same SDKs and tools:

// Works with all three — just change the endpoint
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3'

const client = new S3Client({
  region: 'auto',
  endpoint: 'https://xxx.r2.cloudflarestorage.com', // R2
  // endpoint: 'https://s3.us-west-2.amazonaws.com', // S3
  // endpoint: 'https://s3.us-west-002.backblazeb2.com', // B2
  credentials: { accessKeyId: '...', secretAccessKey: '...' },
})

Migration between them is straightforward — change the endpoint and credentials.

Features

FeatureR2S3B2
S3 API compatible✅ (native)
CDN integration✅ (Cloudflare CDN)✅ (CloudFront)✅ (Cloudflare partnership)
Lifecycle rules✅ Best
Versioning
Object lock
Multipart upload
Pre-signed URLs
Event notifications✅ (Workers)✅ (Lambda/SNS)✅ (webhooks)
RegionsAuto (global)30+ regions2 regions

S3 has the most features. R2 covers the essentials. B2 is functional but limited.

Performance

R2S3B2
Latency (first byte)~50ms~50ms~100ms
ThroughputHighHighestGood
Multi-regionAuto-distributedPer-region2 regions only

S3 and R2 are comparable. B2 is slightly slower and has limited geographic distribution.

When to Use Each

Choose Cloudflare R2 When

  • Egress costs matter (serving files to users)
  • Already using Cloudflare (Workers, Pages, CDN)
  • Want simple, predictable pricing
  • Serving images, videos, or downloads
  • Building a SaaS with file uploads

Choose AWS S3 When

  • Need advanced features (versioning, object lock, lifecycle)
  • Already deep in AWS ecosystem
  • Need specific region compliance
  • Enterprise requirements (SOC 2, HIPAA, etc.)
  • Need S3 event triggers with Lambda

Choose Backblaze B2 When

  • Storing large amounts of data cheaply (backups, archives)
  • Low egress needs (backups you rarely access)
  • Budget is the primary concern
  • Paired with Cloudflare CDN (free egress via bandwidth alliance)

The Cloudflare + B2 Trick

Backblaze and Cloudflare have a bandwidth alliance: egress from B2 through Cloudflare is free. So you get B2's cheap storage ($0.006/GB) with Cloudflare's CDN and zero egress:

Users → Cloudflare CDN (free) → Backblaze B2 ($0.006/GB storage)

This is the absolute cheapest option for serving static files.

FAQ

Can I migrate from S3 to R2?

Yes. R2 is S3-compatible. Change endpoint and credentials. Use rclone for bulk migration.

Is R2 production-ready?

Yes. R2 has been GA since 2022 and is used by many production apps.

Does B2 work with existing S3 tools?

Yes. B2's S3-compatible API works with AWS SDKs, rclone, and most S3 tools.

What about DigitalOcean Spaces or Linode Object Storage?

Both are S3-compatible and cheaper than S3, but more expensive than R2 and B2. R2 or B2 are better choices in 2026.

Bottom Line

Cloudflare R2 is the best default for new projects. Zero egress fees, S3-compatible, good performance. AWS S3 only if you need advanced features or are locked into AWS. Backblaze B2 for the cheapest storage, especially paired with Cloudflare CDN.

For most web apps: R2. For backups: B2. For enterprise AWS: S3.

Get AI tool guides in your inbox

Weekly deep-dives on the best AI coding tools, automation platforms, and productivity software.