The pricing for Firebase Hosting is based upon your project's usage of the following:
Hosting storage (GB) — The amount of storage space required to store the content of your Hosting sites (your static files and your configuration files).
Data transfer (GB/month) — The amount of data transferred to end users from our CDN. Every Hosting site is automatically backed by our global CDN at no charge.
Your Hosting quota is project-level, not site-level or channel-level. You can upgrade your project to the Blaze billing plan to unlock additional paid storage and data transfer levels. Learn more about quotas and pricing for Firebase Hosting.
We recommend setting up budget alerts for your project in the Google Cloud Console.
Monitor both your Hosting storage level and data transfer level in the Firebase console:
Visit the Usage dashboard in the Hosting section of the console.
You can view the usage levels for different billing periods as well as for all your Hosting sites or for each site.
Visit your project's Usage and billing dashboard in the console.
Understand Hosting storage
When you deploy new content to your site, you create a "release" that points to a specific version of content and configuration for your site. The files associated with each release (both new releases and any retained previous releases) are stored by Firebase. These files make up your project's Hosting storage usage level.
This Hosting storage is independent and unrelated to any other storage for your Firebase project (like Cloud Storage for Firebase or database storage).
Note that Hosting has a maximum size limit of 2 GB for individual files.
Quota for Hosting storage
Storage for your Hosting content is at no cost up to 10 GB.
If you are not on the Blaze plan, and you reach the 10 GB limit of no-cost Hosting storage, you won't be able to deploy new content to your sites. You'll need to delete older releases or upgrade to the Blaze plan.
If you are on the Blaze plan, and you reach the 10 GB limit of no-cost Hosting storage, you'll be billed $0.026 for each additional GB of Hosting storage.
Control usage of Hosting storage
To control your Hosting storage usage, here are some things you can do:
Set a limit for the number of releases to keep.
Manually delete specific releases.
Store larger files using Cloud Storage for Firebase, which offers a maximum size limit in the terabyte range for individual objects.
Understand Hosting data transfer
When Hosting serves one of your site's resources, data transfers from our CDN to your end user. The requested resource might already be available in our CDN cache (a cache hit) or it might need to come from the Hosting backend (a cache miss). If the requested content can be cached in the CDN, it will be. Both cache hits and misses count toward your project's Hosting data transfer usage.
Quota for Hosting data transfer
Every Hosting site is automatically backed by our global CDN at no charge. Data transfer from the CDN to your end users is at no cost up to 10 GB/month.
If you are not on the Blaze plan, and you reach the 10 GB/month limit of no-cost data transfer, we offer a short grace period but then your sites will be disabled. Your sites will remain disabled until the start of the next month because data transfer billing is based on monthly usage levels. You can reenable your sites immediately by upgrading to the Blaze plan.
If you are on the Blaze plan, and you reach the 10 GB/month limit of no-cost data transfer, you'll be billed $0.15 for each additional GB of data transferred that month.
Control usage of Hosting data transfer
To control your Hosting data transfer usage, here are some things you can do:
Fine-tune the client-side caching of your content so that browsers don't need to request a resource from the CDN. Learn more about caching in the web developer documentation.
Avoid loading images and videos that you don't actually need to display.
Create service workers to handle certain requests.
If you load Firebase SDKs via reserved Hosting URLs, make sure to read important information about the reserved namespace for these URLs.
Here are some resources to help you set up service workers, especially with a PWA:
Documentation: Service Worker Mindset