Migrate from Supabase to Firebase
Startup · practitioner · 10 min read · last reviewed 2026-09-13
Two migrations share this name and cost very different amounts. Firestore means giving up SQL entirely; Firebase SQL Connect is Postgres to Postgres with an instance fee. Plus the bcrypt import that makes auth almost free.
TL;DR
- Firestore is a document store with no joins, no foreign keys, no arbitrary ORDER BY, and no text search, so a Supabase schema does not port to it unchanged.
- Firebase SQL Connect went GA in April 2025, is backed by Cloud SQL for PostgreSQL, and is the only Firebase path that is a genuine Postgres to Postgres move.
- SQL Connect costs 250,000 operations per month free on Blaze then $0.90 per million, plus a Cloud SQL instance from about $9.37 per month, so its floor is higher than Supabase's free tier.
- Firebase Authentication allows 50,000 free monthly active users and imports Supabase's bcrypt hashes directly with firebase auth:import --hash-algo=BCRYPT.
- Firestore truncates indexed values at 1,500 bytes, which makes query results quietly inconsistent rather than raising an error.
There is no single Supabase to Firebase migration. There are two, and they cost wildly different amounts. Firestore is a document store, so moving to it means giving up joins, foreign keys, and SQL, which is a rewrite of your data layer rather than a port. Firebase SQL Connect, generally available since April 2025 and previously called Data Connect, is backed by Cloud SQL for PostgreSQL, so it is a Postgres to Postgres move with a GraphQL layer replacing PostgREST. Pick the path before you touch anything, because they share almost nothing.
Choose the path first
Ask one question: does your application rely on SQL?
If the answer is yes in any meaningful way, and for a Supabase project it usually is, then Firestore is not a migration target. It is a redesign. Take the SQL Connect path and accept a monthly instance cost, or reconsider whether you should be moving to Firebase at all rather than to Neon, which keeps Postgres without the GraphQL layer.
If your data is genuinely document-shaped, if you were mostly using Supabase as a key-value store with realtime, and if you never wrote a join you cared about, Firestore is cheaper and its free tier is better.
| Firestore | Firebase SQL Connect | |
|---|---|---|
| Data model | NoSQL documents | Cloud SQL for PostgreSQL |
| Migration from Supabase | Rewrite the data layer | Postgres to Postgres |
| Free tier | 1 GiB stored, 50K reads/day, 20K writes/day | 250,000 operations/month on Blaze |
| Additional cost | None below the free limits | Cloud SQL instance from about $9.37/month |
| Query language | Document queries with composite indexes | SQL, exposed through generated GraphQL |
The cost line is the one that changes decisions. Supabase's free tier has no instance fee. SQL Connect always has one after the trial, so the floor is higher than what you are leaving even though the ceiling is higher too.
What Firestore actually takes away
If you are considering Firestore, know exactly what you are giving up. These are not rough edges, they are absences.
- No joins. You denormalize, or you make several round trips and assemble in application code.
- No foreign keys or referential integrity. Nothing stops an orphaned reference. That invariant becomes your job.
- No server-side SQL aggregation beyond
count,sum, andavgaggregation queries. - No arbitrary `ORDER BY`. Ordering requires the field to be indexed and consistent with your filters.
- No `LIKE` and no full text search. You add Algolia, Typesense, or Elastic, which is another vendor and another bill.
The query limits bite in ways that are hard to predict from the documentation. Every non-trivial query needs a hand-declared composite index, and a database is capped at 1,000 composite indexes with billing enabled, or 200 without. Range and inequality filters across multiple fields are supported now but cap at ten such fields per query, and they require carefully ordered composite indexes with equalities first.
The worst one for correctness: indexed values are truncated at 1,500 bytes. Past that, query results become quietly inconsistent rather than raising an error. Transactions exist but are document-scoped, with a 270 second limit, a 60 second idle expiry, and 500 field transformations per commit. Documents cap at 1 MiB.
None of this makes Firestore a bad database. It makes it a different one, and a Supabase schema does not survive contact with it unchanged.
The SQL Connect path
SQL Connect is the comparison worth making, because the underlying engine is the same Postgres you already run. You define a schema in GraphQL, Firebase provisions Cloud SQL behind it, and you get generated typed SDKs for your clients.
What changes is the access layer rather than the data. Supabase gives you PostgREST plus row level security, where authorization lives in the database as policies reading JWT claims. SQL Connect gives you a GraphQL schema with its own authorization directives. Your RLS policies do not port. You express the same rules in a different place, which is real work but is rule-for-rule translation rather than redesign.
Pricing runs at 250,000 operations per month free on Blaze, then $0.90 per million operations, plus the Cloud SQL instance itself. The Spark plan caps at 8,300 operations per day, which is a prototype allowance rather than a production one.
Dump and restore is the same shape as any Postgres move. Take public only, use --no-owner --no-acl because Supabase's roles will not exist on the destination, and match the major version.
Auth is the easy part
This is where Firebase is genuinely strong, and where the migration is close to free.
Firebase Authentication allows 50,000 monthly active users on the free Spark plan, matching Supabase exactly. More importantly, the password migration is solved rather than worked around. Supabase stores standard bcrypt hashes with a per-user salt in auth.users.encrypted_password, and the Firebase CLI imports bcrypt directly:
firebase auth:import users.json --hash-algo=BCRYPTNo hash key is needed for bcrypt. No user resets a password, and no lazy migration layer is required. The importer also handles Scrypt, StandardScrypt, several HMAC variants, MD5, SHA family, PBKDF_SHA1, and PBKDF2_SHA256, so it is a good destination from almost anywhere.
There is no export button in the Supabase dashboard. Pull the rows with a direct query against the auth schema and treat that file as a credential, because that is exactly what it is.
Two limits to plan around. Enterprise SAML and OIDC connections have their own free allowance of just 50 monthly active users, which is a fraction of the general pool and catches B2B teams by surprise. Phone authentication is billed per SMS rather than counted against the MAU allowance. For how this compares to the dedicated identity providers, see Firebase Auth alternatives and Replace Supabase Auth.
Storage moves cleanly
Supabase Storage is S3 protocol compatible. Enable the S3 connection in your Storage settings and it authenticates with AWS Signature Version 4, implementing bucket operations, object get, put, delete and copy, multipart upload, and both ListObjects versions. Supabase's own documentation says it works with almost any S3 client.
Firebase Cloud Storage buckets are Google Cloud Storage buckets, so the practical path is a sync between an S3 remote pointed at Supabase and a GCS remote, then repointing Firebase at the destination bucket. There is no single official one-shot tool for this pairing, so a general-purpose sync utility is the pragmatic answer.
One gap to note before you rely on it: Supabase Storage has no S3 versioning. If you were counting on version history as a safety net during the copy, it is not there.
Cloud Storage for Firebase gives 5 GB on the free plan with 1 GB of downloads per day, against Supabase's 1 GB of storage and 5 GB of egress. Firebase is the more generous side on storage volume. If egress is what actually hurts, neither is the right answer and Cloudflare R2 charges nothing for it at any volume.
Realtime and functions
Supabase Realtime and Firestore's realtime listeners solve the same problem with different models. Supabase streams Postgres changes. Firestore pushes document snapshots to subscribed clients, which is a more natural fit if you are taking the Firestore path and a gap if you are taking SQL Connect, where you would poll or add a separate channel.
Edge Functions map onto Cloud Functions reasonably well, but the runtimes differ. Supabase Edge Functions run Deno. Cloud Functions run Node, Python, and several others. Anything using Deno-specific APIs or npm-via-Deno imports needs rewriting rather than copying, and the free allowance is 2 million invocations per month.
Sequence the work
Do these in order and do not overlap them. The failure mode of a combined migration is that you cannot tell which system broke.
- Decide Firestore or SQL Connect, and write the decision down with the reasoning. Changing your mind halfway is the expensive outcome.
- Move auth first. It is the lowest-risk piece because bcrypt imports cleanly, and it is independently reversible.
- Move storage second. Sync, verify object counts and a sample of checksums, then repoint.
- Move data last, because it is the piece with the most surface area and the least reversibility.
- Keep Supabase running through a full billing cycle, so rollback stays a configuration change.
If step one lands on Firestore and step four turns into a schema redesign, stop and reconsider. A rewrite of your data layer to reach a free tier is rarely the cheapest way to save money, and the alternatives are laid out in Supabase alternatives compared.
Key takeaways
- Decide Firestore or SQL Connect before anything else and write down the reasoning, because changing your mind halfway is the expensive outcome.
- If your app relies on SQL at all, Firestore is a redesign rather than a migration, and Neon is probably the better destination.
- Auth is the cheapest part of this move and the safest place to start, because bcrypt imports cleanly and the step is independently reversible.
- Enterprise SAML and OIDC connections have their own free allowance of just 50 monthly active users, which catches B2B teams by surprise.
- Supabase Storage speaks S3 with SigV4, so storage migration is a sync between endpoints, but there is no S3 versioning to fall back on.
- Edge Functions run Deno and Cloud Functions do not, so anything using Deno-specific APIs is a rewrite rather than a copy.
Frequently asked questions
- Is Firebase a drop-in replacement for Supabase?
- Only if you take the SQL Connect path. Firestore is a NoSQL document store, so joins, foreign keys, referential integrity, arbitrary ORDER BY, LIKE, and full text search have no equivalent. Firebase SQL Connect is backed by Cloud SQL for PostgreSQL, which makes it a real Postgres to Postgres move with a GraphQL access layer replacing PostgREST.
- What is Firebase SQL Connect?
- It is the product previously called Firebase Data Connect, generally available since April 2025. You define a schema in GraphQL, Firebase provisions Cloud SQL for PostgreSQL behind it, and you get generated typed SDKs. Pricing is 250,000 operations per month free on Blaze, then $0.90 per million, plus the Cloud SQL instance itself starting around $9.37 per month.
- Can Firebase import my Supabase passwords?
- Yes, directly. Supabase stores standard bcrypt hashes, and the Firebase CLI accepts them with firebase auth:import --hash-algo=BCRYPT, with no hash key required. No user resets a password. The importer also handles Scrypt, StandardScrypt, HMAC variants, MD5, SHA family, PBKDF_SHA1, and PBKDF2_SHA256.
- What are Firestore's worst limits in practice?
- Indexed values truncate at 1,500 bytes, which makes results inconsistent silently rather than erroring. Every non-trivial query needs a hand-declared composite index, capped at 1,000 per database with billing enabled. Range and inequality filters cap at ten fields per query. Documents cap at 1 MiB and transactions are document-scoped with a 270 second limit.
- How do I move the files out of Supabase Storage?
- Supabase Storage exposes an S3-compatible endpoint using AWS Signature Version 4 once you enable the S3 connection in settings, so any S3 client can read from it. Firebase Cloud Storage buckets are Google Cloud Storage buckets, so the path is a sync from the Supabase S3 remote to a GCS remote, then repointing Firebase. Note there is no S3 versioning on the Supabase side.
Related
Vendor comparisons
Go deeper