the writing custom software & architecture 12 min updated

Firebase vs Supabase in 2026: Which Backend to Build On

Firebase is stronger on native realtime and offline. Supabase gives you Postgres, SQL-based RLS and an exit path. Here's how to choose, and how to migrate.

Line-art balance scale weighing nested document cards against a grid of linked database tables

Pick Firebase if you are building mobile-first, need offline sync that works without extra code, and your data fits documents. Start with the shape. Pick Supabase if your data is relational, you want SQL and Row Level Security, or you want the option to self-host later. That is the short version. The rest of this post backs it up with the official pricing pages and docs, a decision table covering data model, auth, realtime, cost at three app sizes and the exit path, plus a checklist for moving Firestore data into Postgres. Both platforms are good. They are good at different things.

Document store or Postgres: what you are really choosing

Firestore stores JSON-like documents grouped in collections. Supabase gives every project its own dedicated Postgres database. That difference matters. Everything else flows from it.

Documents are brilliant when a screen maps to one read. A profile, a chat room, a to-do list: fetch one thing, render it, move on. The limits are worth knowing, though. Per the Firestore usage and limits page, a document tops out at 1 MiB (1,048,576 bytes) and subcollections can nest up to 100 levels deep. You will rarely hit either. What you will hit is the lack of joins. Supabase's own comparison page (a vendor source, dated 2025-08-20) puts it plainly: Firebase is schemaless JSON with no native joins, while Supabase is Postgres with foreign keys and full ACID transactions. Take the framing with the usual vendor salt, but the technical description matches how Firestore works. Relational data in Firestore usually means denormalising first, then running several queries in code.

Postgres flips that. Invoices, line items, customers and subscriptions sit in tables with constraints, and one query joins them. That is ordinary database work. If your product has reporting, admin screens or anything an accountant might ask about, that matters more than it sounds.

Two footnotes before moving on. Firebase's docs now note that Firestore is offered with MongoDB compatibility, so the document side keeps evolving. Firebase also has its own Postgres route: SQL Connect, backed by Cloud SQL for PostgreSQL, comes with a 3-month no-cost trial, then starting as low as $9.37 a month, according to the Firebase pricing page. On Spark, if you do not upgrade to Blaze by the trial's end, the instance is archived and deleted after a further 90 days. So "Firebase means NoSQL" is no longer strictly true. If Postgres is your goal, though, Supabase is the more direct route.

Auth and access control: Security Rules against RLS

Both platforms ship auth that gets you to login in an afternoon. The real difference is how you say who can read what.

Firestore Security Rules use a domain-specific language, and they differ across Firestore, Storage and Functions. Keep that separation clear. Per the Firebase database comparison doc, the rules are non-cascading (unless you use a wildcard), mobile and web SDK access is governed by the rules, and server SDKs are governed by IAM. One behaviour catches people out: rules can constrain queries, so if a query's results might contain data the user can't access, the entire query fails. It is strict. That strictness is a strength, because you find out early.

Supabase uses Postgres RLS, with policies written in SQL. If you already know SQL, there is no second language. If you don't, the learning curve is real. RLS has a failure mode of its own, too: a table exposed through the API without RLS enabled is open to anyone holding the project URL. Supabase Advisors flags this, and also flags always-true policies such as USING (true) at WARN level, because they look protected while allowing unrestricted access. I have a longer write-up in the Supabase RLS guide.

On volume and cost:

  • Firebase Auth (via Identity Platform): 50K MAUs no-cost, and SAML/OIDC gets 50 MAUs no-cost. Phone auth is billed per SMS sent on Blaze.
  • Supabase Auth: 50,000 MAUs on Free, 100,000 on Pro, then $0.00325 per MAU.
  • Enterprise SSO: the Supabase comparison page says SAML/OIDC SSO is available on Pro and Enterprise, while the pricing page only marks SAML as not included on Free and lists dashboard SSO under Team. Check both before you promise an enterprise customer anything.

Realtime and offline

This is where Firebase has the clearest edge. Firestore's SDKs cache actively used data on the device, so an app can read, write and listen offline and sync on reconnect. Supabase's comparison page concedes the other side: offline access on Supabase needs your own caching strategy (it names Zero and Electric as options). Makerkit makes a similar point, saying Firebase realtime is native and automatic while Supabase needs setup and manual client state reconciliation. And Justin McKelvey, a fractional CTO writing in June 2026, rates Firebase realtime as the strongest for mobile and offline, with Supabase's Postgres logical replication good for web. Three independent voices. One conclusion.

So if your app lives on a phone that spends half its life in a lift, that's your answer. Done.

For a web app with live dashboards, notifications or collaborative bits, Supabase Realtime is plenty. The limits matter. Limits by plan, from the Supabase pricing page:

  • Free: 200 concurrent peak connections, 2 million messages a month, 256 KB maximum message.
  • Pro and Team: 500 connections, then $10 per 1,000. 5 million messages, then $2.50 per million. 3 MB maximum message.

Firebase's Realtime Database (a separate product from Firestore) lists 100 simultaneous connections on Spark and 200K per database on Blaze. Firestore, meanwhile, bills real-time updates at $0.30 per million reads, charged per document on the Standard edition. That meter is easy to forget. Chatty listeners cost money on both sides. Watch them.

Pricing at three app sizes

The two platforms bill in different units. Firebase bills per operation. Supabase bills per plan, then per compute size, then per overage. So there is no honest single-number comparison, and I am not going to invent one. What I can do is show where each bill comes from at three sizes. Treat these as illustrative shapes, not quotes. For worked Supabase numbers, see Supabase pricing 2026: real app costs.

Prototype

Firestore's no-cost quotas, per the Firebase pricing page, are 1 GiB stored, 10 GiB a month egress, and daily limits of 20K writes, 50K reads and 20K deletes (quotas reset around midnight Pacific time). Cloud Functions are not available on Spark at all. Supabase Free is $0 with 500 MB of database, 50,000 MAUs, 1 GB of file storage and unlimited API requests. The catches are plain: projects pause after one week of inactivity, and you get two active projects.

A small warning on figures you may see elsewhere. The official Supabase page lists 5 GB egress on Free, but Makerkit lists 500MB bandwidth and McKelvey lists 2 GB. Trust the pricing page. Expect third-party posts to lag.

Small paying product

Supabase Pro starts at $25 a month and includes 100,000 MAUs, 8 GB of disk, 250 GB egress and daily backups kept for 7 days. Paid plans also include $10 a month of compute credit, which covers one Micro instance. The spend cap is on by default, and you must switch it off to pay for usage beyond the included quotas. That is a sensible guardrail. It is worth leaving on until you understand your traffic.

Firebase goes to Blaze, where the no-cost usage from Spark carries over and, if eligible, you get $300 in free credit. Beyond the quotas, Firestore Standard in us-central1 is $0.30 per million reads, $0.90 per million writes and $0.10 per million deletes (per the Firestore pricing doc). Cloud Functions include a monthly invocation allowance, then $0.40 per million. For a read-light app, that bill can stay very low. The risk is a read-heavy screen that fans out into many document reads.

Scaled product

On Supabase, you pick compute: Small, Medium $60, Large $110 (dedicated, 2 vCPUs, 8 GB), XL $210, billed hourly. Point in Time Recovery is $100 a month per 7 days of retention. That adds up. If you need SOC2 and ISO 27001, that's the Team plan from $599 a month, with HIPAA as a paid add-on.

On Firebase, the Firestore Enterprise edition changes the model: $0.05 per million read units (4 KiB tranches), $0.26 per million write units (1 KiB units, and index writes consume write units), and a separate real-time SKU at $0.30 per million read units. Stored data is $0.00032 per GiB hour versus $0.00020 on Standard. Same database, different meter. Model your own traffic against both before committing.

McKelvey claims Supabase works out 3 to 5 times cheaper for SaaS workloads at 10K+ daily active users. Treat that carefully. That is one advisor's opinion, not a benchmark, and cost depends heavily on read patterns. Firebase's per-operation model can be cheaper for bursty, low-volume apps.

While you're comparing, note two dated Firebase changes: App Hosting outgoing bandwidth pricing started August 1, 2025 (10 GiB a month no-cost, then $0.20 per GiB uncached or $0.15 per GiB cached), and Remote Config pricing takes effect from September 1, 2026, as stated on the pricing page.

Lock-in and the way out

The asymmetry is plain. Supabase can be self-hosted through a Docker setup or the Supabase CLI (the pricing page says so, and Studio is available in the Docker setup). Firebase self-hosting is not supported, per Supabase's comparison. And your Supabase data is just Postgres, so a standard dump moves it anywhere that speaks Postgres. Leaving Firestore is different. It means remodelling documents into something else.

That does not make Firebase a bad bet. Google's infrastructure is a real strength, and plenty of products never need to leave. But you should choose it knowing the exit costs more. Makerkit says it stopped developing its Firebase template because migration requests became overwhelming. A vendor anecdote, yes. It still points the same way.

Decision table

DimensionFirebaseSupabase
Data modelFirestore documents, 1 MiB per document, no native joinsPostgres, foreign keys, ACID transactions
Auth50K MAUs no-cost via Identity Platform, phone billed per SMS50,000 MAUs on Free, 100,000 on Pro then $0.00325 per MAU
Access controlSecurity Rules (DSL), IAM for server SDKsRLS policies in SQL
Realtime and offlineNative listeners, SDK offline cachePostgres Changes, offline needs your own caching
Prototype costSpark: no-cost quotas, no Cloud FunctionsFree: $0, pauses after 1 week idle, 2 projects
Small productionBlaze: per-operation, $300 credit if eligiblePro from $25 a month, $10 compute credit, spend cap on
ScaledPer-operation or per-unit Firestore Enterprise billingCompute from Small to XL and beyond, Team from $599
Lock-in and exitSelf-hosting not supported, data needs remodellingSelf-hostable, standard Postgres dump

For the wider market (Neon, Convex and others), see Supabase alternatives and the serverless databases roundup. This post stays head-to-head.

Where Firebase is still the right call

I would pick Firebase without hesitation in these cases:

  • A mobile app where offline use is normal, not an edge case. The SDK cache does the heavy lifting.
  • A product where realtime sync is the product: chat, presence, live boards. Native listeners with full snapshots save weeks.
  • A team already deep in Google Cloud, where IAM, Cloud Run and Firebase sit in one project and one bill.
  • A simple data shape with few relationships, where a document per screen is the natural fit.
  • A prototype you need on devices fast, using Auth, Firestore and FCM with minimal setup.

Firebase's free products also help: A/B Testing, App Check, Crashlytics, Cloud Messaging and most Authentication options carry no charge on either plan, per Firebase's pricing-plan docs. That is a lot of mobile tooling for nothing.

If you're still weighing the decision for a first release, our MVP development services include choosing the backend against your actual data model before any code gets written. Make that choice early.

Moving from Firestore to Supabase

Supabase's Firestore migration guide describes a tool that copies the entire contents of one Firestore collection into one Postgres table. Documents are flattened to columns of type text , numeric , boolean or jsonb . That gets you started. If your structure is more complex, you split the JSON into related tables before importing. A custom hook, with the signature (collectionName, doc, recordCounters, writeRecord), does the splitting by calling writeRecord for each child row.

A flame and a bolt in a hexagon balanced on a scale above a server stack, comparing two backend platforms

A checklist, built from the docs (label it a procedure, not a promise of outcome):

  1. Inventory collections. List them with node collections.js and decide which become tables, which stay jsonb, and which are dead.
  2. Design the schema first. Arrays and nested maps become child tables with foreign keys. This is where the real work lives.
  3. Dump each collection. firestore2json.js uses a batchSize that defaults to 1000, and a limit that defaults to 0 (no limit). Use a service account key from Firebase Console, renamed firebase-service.json.
  4. Write hooks for anything nested, splitting child records into their own JSON files.
  5. Pick a primary key. The import accepts none (default), smallserial , serial , bigserial , uuid or firestore_id . Keep firestore_id if other systems reference the old IDs.
  6. Import users separately. Per the Supabase Auth migration guide, Firebase password hashes use scrypt, and you supply base64_signer_key , base64_salt_separator , rounds and mem_cost from your project. Users land in auth.users, imported in batches (default 100).
  7. Translate rules to RLS. Rewrite each Security Rule as a policy, enable RLS on every exposed table, then run Advisors to catch always-true policies.
  8. Move files. Supabase also publishes a Firebase Storage migration guide.
  9. Run both in parallel if you can, then cut over.

That parallel step has precedent. A Supabase team member, answering in a 2020 GitHub discussion, described creating a table per root collection with a JSONB column and loading each document into it. For two-way sync during the overlap, they suggested a Firebase Function plus Realtime, with an origin column to avoid infinite loops. The 2023 update on the same thread points to the firebase-to-supabase tool and the Firebase wrapper. Straightforward in principle. Fiddly in practice.

Start with the JSONB route if you are short on time, then normalise table by table once the app is live.

FAQ

Can I run Firebase and Supabase side by side?

Yes, as a transition. The sync pattern from the 2020 discussion is a Firebase Function writing changes into Supabase, with an origin column so writes don't bounce back and forth. Treat it as a bridge for a cutover, not a permanent architecture.

Does Supabase's Free plan hold up for a launch?

For a prototype, yes. The catch is the pause: Free projects pause after one week of inactivity, and you are limited to 2 active projects. Anything customers depend on belongs on Pro, with the spend cap left on until you know your usage.

Does Firebase SQL Connect make Supabase unnecessary?

Not automatically. SQL Connect gives you Cloud SQL for PostgreSQL inside Firebase, with a 3-month trial and per-operation billing afterwards. But Supabase bundles Postgres with RLS, Realtime, Storage and Edge Functions on a single plan, plus a self-hosting option. Compare the full stack. Do not compare just the database.

Is Firestore with MongoDB compatibility a reason to stay on Firebase?

It is worth a look if you have an existing MongoDB-shaped codebase. It doesn't change the relational question: if your queries need joins, Postgres remains the more natural fit.

Firebase wins on native realtime and offline. Supabase wins on relational data and a cheap exit, and the pricing models differ enough that you should price your own read and write patterns on both before choosing.

this post in the tree

Need this done, not just read?

Discuss your website Book 30 minutes