zaro

How much data can you store in Firebase for free?

Published in Firebase Storage 3 mins read

You can store 1 GiB (Gigabyte) of data for free in Firebase, specifically within its default database, Cloud Firestore, under the Spark plan. This generous free tier allows developers to build and launch applications without incurring costs until their usage scales significantly.

Firebase's Free Tier: The Spark Plan

Firebase offers a comprehensive free tier known as the Spark plan, which provides a baseline of free usage for most of its services. While the 1 GiB data storage limit primarily applies to the Cloud Firestore database, other Firebase services like Cloud Storage, Authentication, Hosting, and Cloud Functions also offer their own specific free quotas.

Cloud Firestore Storage and Operations Limits

The 1 GiB free storage is dedicated to the actual data you store in your Cloud Firestore database. Beyond just storage, the Spark plan also includes daily limits on database operations to ensure fair usage.

Here’s a breakdown of the free daily quotas for Cloud Firestore:

Quota Type Free Limit Daily
Stored data 1 GiB
Document Reads 50,000 per day
Document Writes 20,000 per day
Document Deletes 20,000 per day

(For more details on Cloud Firestore usage and limits, you can refer to the official Firebase documentation.)

Understanding the 1 GiB Limit

The 1 GiB limit for stored data includes the data itself, along with metadata such as document IDs, field names, and indexes. It's important to design your database structure efficiently to maximize your free storage. For instance:

  • Normalize Data: Avoid duplicating data unnecessarily.
  • Optimize Field Names: Shorter field names consume less storage.
  • Efficient Indexing: Only index fields that require querying.

Free Tiers for Other Firebase Services

While the 1 GiB storage is specific to the database, it's worth noting that other Firebase services also offer substantial free usage:

  • Cloud Storage for Firebase: Provides 5 GiB of free storage for files (e.g., images, videos), 1 GiB of egress daily, and 20,000 upload/50,000 download operations daily.
  • Firebase Authentication: Allows unlimited user authentication.
  • Firebase Hosting: Offers 10 GB of hosting storage and 360 MB/day data transfer.
  • Cloud Functions for Firebase: Includes 2 million invocations per month, 400,000 GB-seconds, and 200,000 CPU-seconds.
  • Realtime Database: Provides 10 GB of stored data and 10 GB/month network egress.

These free allowances make Firebase an excellent choice for developing and deploying applications, from prototypes to production-ready apps with moderate user bases, without immediate cost concerns. If your application exceeds these free limits, Firebase offers flexible pay-as-you-go pricing plans (Blaze plan) where you only pay for what you use.