Supabase Egress & Storage Cost Calculator (2026)
Pro plans include 250 GB of egress ($0.09/GB overage). Calculate your expected API and storage transfer fees, and simulate how much a free Cloudflare proxy saves.
Supabase Bandwidth & CDN Savings Simulator
Estimate monthly outbound transfer across APIs and Storage, then test how edge CDN caching drops your bill.
1. How to Intercept Supabase Storage with Cloudflare for $0
Supabase provides custom domains on the Pro plan, but you can route asset traffic through Cloudflare without changing your database setup:
- Create a CNAME record: In your Cloudflare DNS, add a subdomain (e.g.
assets.yourdomain.com) pointing to your Supabase project URL (xyz.supabase.co) with the Orange Cloud (Proxy) enabled. - Add a Cache Rule: In Cloudflare Rules > Cache Rules, create a rule matching
(http.request.uri.path contains "/storage/v1/object/public/")and set Edge Cache TTL to 1 Month. - Update Frontend URLs: Replace
xyz.supabase.co/storage/v1/...withassets.yourdomain.com/storage/v1/...in your frontend image tags.
This simple setup intercepts repeated asset requests across Cloudflare's 300+ global edge data centers, dropping your billable Supabase storage egress by 80% to 95%.
Frequently Asked Questions
Supabase Egress Architecture: Storage CDN Offloading & $0.09/GB Bill Shock Prevention
Supabase includes generous monthly bandwidth quotas (5 GB free on the Free Tier, 250 GB included on the $25/mo Pro Tier), but excess bandwidth egress is billed at $0.09 per GB. For media-rich web applications, AI generative image storage backends, and public file download portals, raw database and storage egress fees can rapidly eclipse database compute expenses unless fronted with an external edge cache like Cloudflare.
| Monthly Egress Bandwidth | Included Bandwidth | Direct Supabase Egress Bill | Cost Fronted with Cloudflare | Net Monthly Savings |
|---|---|---|---|---|
| 500 GB / month | 250 GB (Pro Plan) | $25 base + $22.50 = $47.50 | $25.00 flat (Free CDN cache) | $22.50 / month |
| 2,500 GB (2.5 TB / mo) | 250 GB (Pro Plan) | $25 base + $202.50 = $227.50 | $25.00 + $5.00 cache invalidation | $197.50 / mo (87% savings) |
| 10,000 GB (10 TB / mo) | 250 GB (Pro Plan) | $25 base + $877.50 = $902.50 | $25.00 + $20 (CF Pro) | $857.50 / mo (95% savings) |
Production Pipeline: Cloudflare Worker Reverse Proxy for Supabase Storage
Deploying a Cloudflare Worker in front of the Supabase Storage endpoint caches public assets globally with zero egress fees hitting your Supabase account:
// Cloudflare Worker: Supabase Storage CDN Cache Proxy
export default {
async fetch(request: Request): Promise<Response> {
const url = new URL(request.url);
const SUPABASE_ORIGIN = 'https://xyzcompany.supabase.co';
// Construct target URL to Supabase Storage public bucket
const targetUrl = `${SUPABASE_ORIGIN}${url.pathname}${url.search}`;
// Check Cloudflare Edge Cache first
const cache = caches.default;
let response = await cache.match(request);
if (!response) {
response = await fetch(targetUrl, {
headers: request.headers,
});
// Cache successful image and static asset responses for 30 days
if (response.status === 200) {
const newHeaders = new Headers(response.headers);
newHeaders.set('Cache-Control', 'public, max-age=2592000, immutable');
response = new Response(response.body, { ...response, headers: newHeaders });
await cache.put(request, response.clone());
}
}
return response;
}
};
Production Governance & Egress Guardrail Checklist
- Enable Spend Caps on Pro Plan: By default, Pro plans allow overages. Enable the Spend Cap in the Supabase billing settings to prevent unauthorized egress runaway if an image goes viral.
- Avoid SELECT * on Large Bytea Columns: Storing base64 images or PDF binary blobs directly inside PostgreSQL tables burns database egress on routine queries. Always store media in object storage.
- Image Resizing Transformations: Utilize Supabase's built-in image transformation engine (`/render/image/public/bucket/pic.jpg?width=400`) to send thumbnail bytes instead of original 10MB camera uploads.
Bandwidth Unit Economics: Managing Supabase Database & Storage Egress
Supabase provides an exceptional developer experience by bundling PostgreSQL, Auth, Edge Functions, and Object Storage into a unified backend. However, as web applications grow, data egress can become an unexpected cost driver if media assets and heavy query payloads are not properly cached.
Supabase Pro ($25/month) includes 250 Gigabytes of unified egress bandwidth monthly. Egress beyond this quota is billed at $0.09 per Gigabyte. In media-heavy applications (user profile avatars, image uploads, vector retrieval), unoptimized client requests can rapidly burn through the included bandwidth.
The 3-Step Strategy to Eliminate Supabase Egress Overages
- Deploy Cloudflare CDN Proxy in Front of Supabase Storage: Supabase Object Storage URLs should never be served directly to mobile or web clients. Putting a free Cloudflare CDN zone in front of your storage bucket caches static images at the edge, reducing Supabase storage egress by over 85%.
- Avoid SELECT * on Heavy Postgres Columns: When querying relational tables, avoid fetching massive text or bytea columns unless specifically needed. Exclude heavy embedding vectors (e.g. 1536-dim vectors) from standard REST API responses.
- Use Next.js Image Optimization: Automatically resize and reformat images to WebP/AVIF before serving, slashing byte payload sizes by up to 70%.