Home / Insights / Architecture and Modernization
Architecture and Modernization
Firebase vs Supabase for a Startup Backend: Pricing, Lock-in, Auth, Realtime and When to Leave
Both platforms will get a startup to a working product in weeks. The decision that matters is which one you can still afford, operate and leave eighteen months later. This guide compares the two on pricing, lock-in, auth and realtime, and gives a decision table plus an exit plan.
TopicsArchitecture and ModernizationWeb and SaaS DevelopmentSoftware Costs and Budgets
Key takeaways
- Firebase and Supabase solve the same problem with different data models: a document store with a proprietary query API versus a managed Postgres database with standard SQL. The data model, not the feature list, decides how hard it is to leave.
- Both free tiers are generous enough for validation, but they fail differently: Supabase pauses free projects after a week of inactivity, while Firebase’s Spark plan simply blocks Cloud Functions and Cloud Storage until you add billing.
- Paid pricing on Firebase is metered per operation (reads, writes, invocations), which rewards efficient access patterns and punishes chatty ones; Supabase prices by compute size plus overages, which is easier to forecast but has a step function when you outgrow an instance.
- Auth is the stickiest component on both platforms. Plan user-migration early: password hashes, provider links and MFA enrolments do not export cleanly from either.
- Decide the exit triggers before you sign up: a cost curve that outpaces revenue, a query you cannot express, a compliance requirement for data residency, or an acquirer’s due diligence. Write them down and review them quarterly.
On this page
- What you are actually choosing: a data model, not a vendor
- Pricing part one: what the free tiers really cover
- Pricing part two: how each bill behaves as you grow
- Auth and realtime: the two components that decide stickiness
- Lock-in and portability: what leaving actually involves
- How to decide: a table and the honest cases for each
- When to leave, and how: triggers and a migration checklist
- Frequently asked questions
- Sources and methodology
Founders and early CTOs ask us the Firebase-or-Supabase question more often than any other backend question, and the honest answer is that both work. We have shipped products on each, and we list both on our startup services page alongside PostgreSQL, Node.js and Next.js because the right choice depends on the product, the team and the exit plan rather than on which platform is better in the abstract.
This article is for the person who has to live with the decision: the technical co-founder, the first engineering hire, or the non-technical founder who needs to understand what a development partner is proposing. It compares the two platforms on the dimensions that cause regret later — pricing behaviour at scale, lock-in, authentication, realtime — and ends with a decision table and a concrete plan for leaving either platform if you need to. We wrote a broader piece last year on choosing between Firebase, Supabase and a custom back end; this one goes deeper on the two managed options and assumes you have already ruled out building your own.
Pricing and quotas below are taken from the two vendors’ public pricing pages as we read them; both change their plans periodically, so treat the figures as a snapshot and re-check before you budget.
What you are actually choosing: a data model, not a vendor
The marketing of both platforms emphasises the bundle: database, authentication, file storage, serverless functions, realtime, hosting. The bundles are similar enough that comparing feature checklists is unproductive. The real difference sits underneath.
Firebase: a document store behind a proprietary SDK
Firebase’s primary database is Cloud Firestore, a NoSQL document database queried through Google’s client SDKs. You model data as collections of documents, denormalise aggressively, and accept that joins, aggregations and ad hoc reporting are either done client-side, pre-computed on write, or exported to BigQuery. The platform rewards you with excellent offline support on mobile, automatic scaling without capacity planning, and tight integration with Google Cloud. Google’s Firestore quotas page also documents hard limits that shape your schema, such as the one free database per project and the depth limits on subcollections.
Supabase: managed Postgres with an API layer on top
Supabase’s primary database is a Postgres instance that you own. The auto-generated REST and realtime APIs, the auth service and the storage service all sit beside that database rather than replacing it. You model data relationally, write SQL, and use Postgres features such as row-level security, triggers, views and extensions. The trade-off is that you are back to capacity planning: a Postgres instance has a size, and when you outgrow it you upgrade it.
Why this matters more than the feature list
Every later question in this article — cost behaviour, lock-in, how hard migration is — follows from that split. A document store with a proprietary query API is easy to start and hard to leave; a standard relational database with an open API layer is marginally harder to start and much easier to leave. If your team has strong SQL skills and your product has relational data (orders, bookings, invoices, multi-tenant accounts), Supabase’s model fits. If your product is a mobile-first app with a user-centric data shape and offline requirements, Firestore’s model fits. Decide this first.
Action: sketch your top five queries before choosing. If three of them are aggregations or joins across entities, lean relational.
Pricing part one: what the free tiers really cover
Both free tiers are adequate for building and validating an MVP. They fail in different ways, and the failure modes matter because they tend to surface during a demo.
Firebase Spark
According to the Firebase pricing page, the no-cost Spark plan includes 1 GiB of Firestore storage, 50,000 document reads, 20,000 writes and 20,000 deletes per day, 10 GB of Hosting storage with 360 MB per day of transfer, and Authentication at no cost up to 50,000 monthly active users. Two things are not available on Spark at all: Cloud Functions and Cloud Storage. Phone authentication is also unavailable without billing. In practice, most real products need at least one server-side function, so the realistic starting point is the Blaze pay-as-you-go plan with the same free allowances and metered usage above them.
Supabase Free
The Supabase pricing page lists a free plan with a 500 MB database, 50,000 monthly active users, 1 GB of file storage, 5 GB of egress, 500,000 edge function invocations and 2 million realtime messages, limited to two active projects. The catch is pausing: free projects are paused after one week of inactivity. A paused project does not serve requests until someone restores it from the dashboard. We have seen more than one founder discover this five minutes before an investor meeting.
Practical reading
- If the MVP is a weekend-a-month side project, Firebase Spark stays up; Supabase Free will pause.
- If the MVP needs server-side logic or file uploads, Firebase requires a billing account from day one; Supabase does not.
- Both free tiers cap database size at a level (1 GiB and 500 MB respectively) that a real product with logs or uploads will exceed within months.
Action: for anything you will show to customers, budget for the first paid tier from launch and treat the free tiers as development environments.
Pricing part two: how each bill behaves as you grow
The free tiers are a distraction. What determines whether the platform is still affordable at 10,000 users is the shape of the paid bill.
Firebase Blaze: metered per operation
Blaze charges for usage beyond the free allowances at Google Cloud rates. The pricing page lists some unit prices directly — for example Cloud Functions invocations at USD 0.40 per million after the first 2 million, Hosting transfer at USD 0.15 per GB after the free allowance, and Realtime Database storage at USD 5 per GB — and refers to Google Cloud pricing for Firestore operations. The important property is that the bill is proportional to operations, not to users. A feature that re-reads a 200-document collection on every screen refresh costs a multiple of one that reads a pre-aggregated summary document. This makes Firebase cheap for disciplined teams and surprisingly expensive for teams that write naive client queries, and the surprise usually arrives after a growth spike rather than before it.
Supabase Pro: compute size plus overages
Supabase’s Pro plan starts at USD 25 per month per organisation with the first project included, and bundles 8 GB of database space, 100,000 monthly active users, 100 GB of file storage and 250 GB of egress, with overages priced per unit (USD 0.125 per GB of database, USD 0.00325 per additional MAU, USD 0.09 per GB of egress). Paid plans include USD 10 per month of compute credit, which covers the smallest Micro instance; larger instances are priced as add-ons from USD 15 (Small, 2 GB RAM) through USD 110 (Large, 2 dedicated vCPUs, 8 GB) to several thousand dollars for the biggest sizes. Spend caps are on by default, so a traffic spike degrades service rather than producing a surprise invoice. The bill is mostly a step function of instance size, which is easier to forecast but means growth arrives as a decision (“do we upgrade to Large?”) rather than as a gradual slope.
Illustrative comparison
The table below is an illustrative scenario, not a benchmark: a B2B SaaS with 2,000 monthly active users, a few hundred MB of data, modest file storage and a backend that averages 30 database operations per user session. Your numbers will differ, and the point is the shape of each bill rather than the totals.
| Cost driver | Firebase (Blaze) | Supabase (Pro) |
|---|---|---|
| Base platform fee | None; pay for usage above free allowances | USD 25/month plus compute above the included credit |
| Database operations | Metered per read/write/delete; sensitive to query patterns | Included in instance; limited by CPU and RAM, not by operation count |
| Database storage | Metered per GiB above 1 GiB | 8 GB included, then USD 0.125/GB |
| Auth | No cost to 50,000 MAU; SMS billed per message | 100,000 MAU included, then USD 0.00325/MAU |
| Serverless functions | 2M invocations free, then USD 0.40/M plus compute | 2M edge invocations included, then USD 2/M |
| Growth behaviour | Smooth slope; surprises come from inefficient queries | Step function; surprises come from hitting instance limits |
| Budget control | Google Cloud budget alerts; no hard cap by default | Spend cap on by default |
Action: whichever platform you pick, add a cost dashboard in the first sprint and review it monthly. On Firebase, instrument reads per session; on Supabase, watch CPU and connection counts.
Auth and realtime: the two components that decide stickiness
Database migration is a well-understood engineering task. Auth and realtime are where startups actually get stuck, because they touch every client and every session.
Authentication
Firebase Authentication (backed by Google Cloud Identity Platform on the paid tier) supports email and password, phone, anonymous sign-in and a long list of federated providers, with SAML and OIDC available at no cost up to 50 monthly active users. Supabase Auth offers email, phone, magic links, OAuth providers and SSO, implemented as a service beside your Postgres database with user records in an auth schema you can query. The functional overlap is large. The difference is in ownership: on Supabase the user table is in your database and row-level security policies reference it directly; on Firebase the user store is a separate managed system you access through the Admin SDK.
Both platforms allow exporting users, and both have published migration guides; Supabase’s documentation maintains a Firestore data migration guide and links to a separate guide for Firebase Auth users. The practical difficulty is not the export but the details: password hash algorithms must be supported on the receiving side, federated identities need provider links re-created, and MFA enrolments typically do not carry across, so users are asked to re-enrol. We covered the broader passwordless direction in our article on passkeys; if you expect to migrate at some point, keeping the password-based share of your user base small helps.
Realtime
Firestore’s realtime listeners are a core feature of its SDK: a client subscribes to a document or query and receives updates, with offline caching on mobile. Supabase Realtime streams Postgres changes over websockets and adds broadcast and presence channels; the pricing page lists 200 concurrent connections and 2 million messages per month on the free plan, rising to 500 connections and 5 million messages on Pro, with overages beyond that. The Firestore model is more deeply integrated with the data layer and better for offline-first mobile; the Supabase model is more flexible for server-driven events and easier to replace with a dedicated pub/sub service if you outgrow it, because it is a layer beside the database rather than the database itself.
Stickiness scorecard
- Firestore listeners in every mobile screen: high lock-in. Replacing them means rewriting data access on the client.
- Supabase client with PostgREST queries: medium lock-in. Queries are SQL-shaped but the client library is proprietary; moving to a custom API means rewriting the data layer, not the schema.
- Either auth service: high lock-in until you have rehearsed a user migration.
- Storage buckets: low on both; files and metadata copy out with standard tooling.
Action: wrap data access behind a thin repository layer in your client code from the first sprint. It costs a few days and halves the cost of a future migration.
Lock-in and portability: what leaving actually involves
“Open source” is often used as shorthand for “portable”, and it is worth being precise about what each platform offers.
Supabase: self-hostable, with caveats
Supabase publishes its components and a Docker-based self-hosting route; its self-hosting documentation describes Docker as the recommended way to run it. The same page is candid about what you give up: self-hosted Supabase runs as a single project, Studio does not support multiple organisations, and branching, managed backups, point-in-time recovery and several other hosted features are not available. You also take on provisioning, hardening, Postgres maintenance, high availability, backups and monitoring. In our experience, self-hosting is a credible option for a team with an infrastructure engineer, and a poor one for a three-person startup. The more realistic exit from Supabase is not self-hosting the whole stack but taking the Postgres database to any managed Postgres provider and replacing the auto-generated API with your own, which is a standard migration. We compared managed Postgres options in a separate article.
Firebase: proprietary, with export tooling
Firestore is not available to self-host. Exits are therefore data migrations to a different database. The Supabase migration guide above describes the shape of that work: each Firestore collection is exported to JSON and loaded as one Postgres table, with nested fields flattened into text, numeric, boolean or JSONB columns, and anything more complex needs custom hooks to split into related tables. That description is accurate for any Firestore-to-relational migration regardless of destination. The real cost is not the data copy; it is redesigning a denormalised document model into a relational one and rewriting every client query against it.
A lock-in comparison
| Component | Firebase | Supabase | Typical exit effort (illustrative) |
|---|---|---|---|
| Database | Proprietary document store; export via tooling | Standard Postgres; pg_dump and restore anywhere | Weeks to months (Firebase) vs days (Supabase) |
| Auth | Managed; export users via Admin SDK/CLI | Service beside your DB; users in auth schema | Weeks on either, dominated by hash formats and MFA |
| Functions | Cloud Functions (Node/Python); portable code, proprietary triggers | Edge Functions (Deno); portable code, proprietary triggers | Days to weeks on either |
| Realtime | SDK listeners woven into clients | Websocket channels over DB changes | Weeks (Firebase) vs days (Supabase) |
| Storage | Cloud Storage buckets | S3-compatible storage | Days on either |
| Whole-stack self-hosting | Not available | Available, community-supported, reduced feature set | Not applicable vs ongoing operational cost |
Action: once a year, run a tabletop exercise: “if we had to be off this platform in 90 days, what would we do?” The answer tells you how much lock-in you have actually accumulated.
How to decide: a table and the honest cases for each
The table below summarises the factors that have most often determined the outcome in projects we have built or reviewed. It is deliberately not a scoring matrix; two or three of these factors usually dominate.
| If this describes you… | Lean towards | Why |
|---|---|---|
| Mobile-first consumer app, offline use matters, small team without SQL depth | Firebase | Offline-capable SDKs, no capacity planning, mature mobile tooling (crash reporting, messaging, analytics in the same console) |
| B2B SaaS with accounts, roles, invoices and reporting | Supabase | Relational model, row-level security for multi-tenancy, SQL for reporting without a separate warehouse |
| You expect to raise and hire a conventional backend team within a year | Supabase | Postgres skills are widely available; the migration to a custom API is incremental |
| You rely heavily on Google Cloud services (BigQuery, Vertex AI, Maps) | Firebase | Same project, same IAM, same billing account |
| Compliance requires a specific data region or self-hosting in future | Supabase | Region selection per project and a self-hosting route exist; Firestore cannot be self-hosted |
| Usage is spiky and unpredictable (viral consumer loops) | Firebase | Operation-based pricing scales without instance decisions; spend alerts needed |
| Budget must be forecastable to the dollar for a board | Supabase | Instance-based pricing with a spend cap on by default |
| Your top queries are joins and aggregations | Supabase | SQL does this natively; Firestore needs pre-aggregation or export |
Where Firebase genuinely wins
Firebase is the better choice when the client is the product: a mobile app whose value is responsiveness, offline resilience and push engagement, built by a small team that wants the backend to be invisible. The pricing model also suits products whose usage might go from nothing to a great deal with no warning, because nothing needs to be resized.
Where Supabase genuinely wins
Supabase is the better choice when the data is the product: anything with tenants, permissions, money or reporting. It is also the safer choice when you are unsure, because its exit is cheaper. If you later decide the managed platform is wrong, your Postgres database and schema come with you intact. We said something similar about keeping options open in our article on startup stack choices that keep burn low without boxing you in.
When neither is right
If you have regulated data with strict residency and audit requirements, a heavily event-driven architecture, or an existing team with strong opinions about infrastructure, a conventional stack (managed Postgres, a framework you know, a cloud you already use) may cost a little more upfront and much less in workarounds. Both platforms are at their best for teams who want to not think about the backend; if you already enjoy thinking about it, use that.
When to leave, and how: triggers and a migration checklist
Most startups never need to leave either platform, and both vendors serve large customers. But “we will migrate when we have to” is not a plan, and the moment you have to is usually the worst moment to start. Here are the triggers we have seen in practice, and the plan we recommend having ready.
Exit triggers worth writing down
- Cost curve outpacing revenue. If platform spend has grown faster than monthly recurring revenue for two consecutive quarters and optimisation has been tried, the model is wrong for your product.
- A query you cannot express. When a core feature requires joins, aggregations or search that the platform cannot do without a second system, you have effectively started migrating already.
- A compliance requirement. Data residency in a specific jurisdiction, a customer’s security questionnaire demanding self-hosting, or a sector regulation that the platform’s terms cannot satisfy.
- Due diligence. Acquirers and late-stage investors ask about vendor dependency. A credible, rehearsed exit plan is usually enough; an actual migration is rarely required.
- Team capability change. You hired a backend team that is more productive on a conventional stack than on the platform’s abstractions.
Migration checklist (either direction)
- Inventory every platform feature in use: database, auth, storage, functions, realtime, hosting, analytics, push. Mark each as “must replace”, “can drop” or “keep for now”. Partial exits are normal; many teams keep Firebase Cloud Messaging while moving the database.
- Export a full copy of the data and prove you can reconstruct the product from it in a staging environment. If you cannot, fix that before anything else.
- Design the target schema. From Firestore this means normalising documents into tables; from Supabase it is usually a straight copy.
- Plan the auth cut-over: hash formats, provider links, MFA re-enrolment, session invalidation and the user communication that goes with it.
- Run dual-writes or change-data-capture for a bounded period so both systems hold the same data, then switch reads, then stop writing to the old one.
- Rehearse the cut-over on staging twice with production-sized data. Measure how long it takes; your real maintenance window is that number plus 50 per cent.
- Keep the old platform alive, read-only, for at least one billing cycle after cut-over.
For example, a 12-person marketplace startup that built on Firestore and now needs supplier-level financial reporting might move only the order and payment collections to Postgres, keep Firebase Auth and Messaging, and run both for a quarter. That partial path is often cheaper and less risky than a wholesale rewrite, and it is a pattern we discuss with clients on our startup engagements when a product moves from validation to growth.
Frequently asked questions
Is Supabase cheaper than Firebase?
Neither is reliably cheaper. Firebase bills per operation above a free allowance, so disciplined query patterns keep it cheap and chatty ones make it expensive. Supabase bills by instance size plus overages, so the bill is predictable but steps up when you outgrow an instance. For a typical B2B SaaS with moderate traffic the two often land in the same range; the difference is in how surprises arrive.
Can I self-host Firebase?
No. Firestore and Firebase Authentication are managed Google services with no self-hosted option. You can export data and users and migrate to another database and identity provider, which is a standard but non-trivial engineering project.
Can I self-host Supabase in production?
Yes, via Docker Compose according to Supabase’s own documentation, but with a reduced feature set (no branching, managed backups or point-in-time recovery, single project per install) and community-only support. For most startups the more practical exit is moving the Postgres database to another managed Postgres provider rather than running the full Supabase stack yourself.
Which is better for a mobile app?
Firebase has the deeper mobile integration: offline-capable SDKs, Crashlytics, Cloud Messaging and analytics in one console. Supabase works well for mobile too, especially with Flutter and React Native, but offline-first behaviour needs more work on your side.
How hard is it to migrate Firebase Auth users to Supabase, or the reverse?
Exporting the user list is straightforward on both platforms. The hard parts are password hash compatibility, re-creating links to social providers, and MFA enrolments, which generally do not transfer. Budget time for a staged cut-over and a user communication plan rather than a one-night switch.
Should a non-technical founder care which one the agency proposes?
Yes, at the level of the data model and the exit plan. Ask the agency to show you the five most important queries, to explain how auth would be migrated, and to confirm that repositories and platform accounts will be in your organisation’s name. Those three questions reveal whether the choice is considered or habitual.
Sources and methodology
Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.
- Google Firebase: Pricing plans (Spark and Blaze) — accessed 10 November 2026. Free allowances, unavailability of Cloud Functions and Cloud Storage on Spark, Authentication MAU limits and unit prices for functions, hosting and Realtime Database.
- Supabase: Pricing — accessed 10 November 2026. Free, Pro and Team plan quotas, overage prices, compute add-on sizes and prices, free-project pausing and default spend caps.
- Supabase Docs: Self-Hosting — accessed 10 November 2026. Docker as the recommended self-hosting route and the stated limitations of self-hosted Supabase compared with the hosted platform.
- Google Firebase Docs: Cloud Firestore usage and limits — accessed 10 November 2026. Firestore free quotas, the one-free-database-per-project rule and structural limits on collections and documents.
- Supabase Docs: Migrate from Firebase Firestore to Supabase — accessed 10 November 2026. How Firestore collections are flattened into Postgres tables during migration and the need for custom hooks for nested data; separate handling of auth users.
Related reading
Continue your research
Not sure whether your product should start on Firebase, Supabase or something else?
Send us your top five user journeys and we will come back with a recommended backend, the cost drivers to watch and a written exit plan, with no obligation.
