Skip to content
Home / Migrations / FirebaseSupabase

Firebase Supabase

medium

Move from Firebase Firestore + Auth to Supabase PostgreSQL + Auth. Biggest change: NoSQL → SQL mindset.

Estimated: 8-16h · 7 steps
Progress0%
Step 1: Export Firestore data

Use firebase-admin to export all collections as JSON.

npx firebase-export-import export --project YOUR_PROJECT
Step 2: Design PostgreSQL schema

Map Firestore collections to SQL tables. Denormalized → normalized. Create migrations with Supabase CLI.

supabase init && supabase db diff --schema public
Step 3: Import data

Transform JSON to SQL inserts. Use pgloader or custom script for large datasets.

Step 4: Migrate Auth

Supabase supports email/password, OAuth, magic links. Export Firebase users with firebase-admin, import via Supabase Management API.

supabase auth admin create-user --email user@example.com
Step 5: Update client code

Replace firebase SDK with @supabase/supabase-js. Firestore queries → SQL via supabase client.

npm uninstall firebase && npm install @supabase/supabase-js
Step 6: Migrate storage

Download files from Firebase Storage, upload to Supabase Storage. Update URLs in database.

Step 7: Test & verify

Run your test suite. Check auth flows, data integrity, and real-time subscriptions.

All tests pass, auth works, data matches
Get started with Supabase

What this migration involves

Moving from Firebase to Supabase is rated medium and takes about 8-16h on a typical project. The guide breaks it into 7 steps, 4 of which ship with runnable commands and 1 with a verification check. On pricing, Firebase is freemium and Supabase is freemium with a free plan to test the move.

FAQ

How long does migrating from Firebase to Supabase take?

Around 8-16h for a typical project — 7 steps, difficulty rated medium, 4 of them with copy-paste commands.

Is moving from Firebase to Supabase reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Firebase data before you start.

What does Supabase cost compared to Firebase?

Firebase: freemium from $0/mo, free plan available. Supabase: freemium from $25/mo, free plan available.