Two "backend as a service" platforms with very different databases underneath.
Firebase and Supabase both give you a database your frontend can talk to directly, plus authentication, file storage and server functions - so you can build an app without running your own backend. The fundamental difference is the database: Firebase's Firestore is a NoSQL document store, while Supabase is a full PostgreSQL database.
| Firebase | Supabase | |
|---|---|---|
| Database | Firestore (NoSQL documents) | PostgreSQL (relational, SQL) |
| Real-time | Live query listeners, built in | Realtime: database changes, broadcast, presence |
| Security | Security rules language | Postgres Row Level Security policies |
| Offline support | Strong, built into client SDKs | Limited - you build it yourself |
| Server code | Cloud Functions | Edge Functions |
| Open source | No | Yes - can be self-hosted |
| Owner | Supabase Inc. |
Firestore stores JSON-like documents in collections. It has no joins, so you shape data around the screens that read it, often duplicating a little. Queries are simple and fast, and every one is designed to scale - but questions like "total sales per customer per month" are awkward.
Supabase gives you an actual PostgreSQL database: tables, foreign keys, joins, constraints, views and the full power of SQL. Its client library generates queries for common operations, and you can drop into SQL whenever you need to. Relational data and reporting are natural.
If your data is naturally relational - users, orders, products, invoices - that difference tends to dominate everything else.
Firestore's real-time model is the simpler of the two: subscribe to any query with onSnapshot() and you're done, with offline caching and reconnection handled for you. It's hard to beat for a first chat app or live feed.
Supabase Realtime can stream database changes to clients, and also offers broadcast messages and presence (who's online) channels. It's capable and flexible, but involves a little more setup, and offline-first behaviour is something you'd need to build.
Both let browsers talk to the database directly, so both rely on server-enforced rules. Firebase uses its own security rules language, written per collection. Supabase uses PostgreSQL's Row Level Security: SQL policies attached to each table, such as "users can only select rows where user_id = auth.uid()". If you know SQL, RLS will feel familiar; if not, Firebase's rules are easier to start with. Either way, forgetting to write them is the most common serious mistake.
Both have free tiers suitable for learning and small apps. Firebase bills per document read, write and delete beyond its free allowance, which is cheap for most apps but can surprise you if a listener re-reads large collections. Supabase's paid plans are based more on resources like database size and compute. Free Supabase projects may be paused after a period of inactivity. Check each platform's current pricing page before committing - both change their plans from time to time.
On lock-in: Firestore is proprietary, and moving off it means redesigning your data model. Supabase is open source and built on standard PostgreSQL, so you can export your database to any Postgres host, or self-host the whole platform.
Stack Picker's quiz recommends Firebase for real-time projects because its client SDK is the gentlest route to live updates for beginners - but if you already know SQL, Supabase is an equally strong choice.