Supabase vs Convex: Postgres Backend or Reactive TypeScript Backend?
Supabase vs Convex: Postgres with SQL and RLS against a reactive document database with TypeScript functions. Realtime, auth, self-hosting, lock-in, pricing.
Supabase is a hosted Postgres database with auth, storage, realtime and auto-generated APIs around it; you model data in SQL and secure it with row-level security. Convex is a reactive document database where all your backend logic lives in TypeScript functions, and every query is automatically live. Choose Supabase if you want SQL and standard Postgres you can take anywhere. Choose Convex if you want a TypeScript-only backend where realtime and transactions come for free and you're comfortable with a less portable platform.
Pricing and licence details checked against supabase.com/pricing, convex.dev/pricing and both projects' docs and GitHub repos in November 2026.
Side by side
| Supabase | Convex | |
|---|---|---|
| Database | PostgreSQL | Document-relational store (tables of JSON-like documents) |
| Query language | SQL, or the auto-generated REST/GraphQL APIs | TypeScript query functions |
| Server logic | Postgres functions, Edge Functions, or your own backend | Queries, mutations and actions written in TypeScript |
| Security model | Row-level security policies in Postgres | Authorization checks in your functions |
| Realtime | Opt-in: Postgres Changes, Broadcast, Presence | Every query is a live subscription by default |
| Auth | Built in (Supabase Auth) | Convex Auth, or Clerk, Auth0, WorkOS, any OIDC provider |
| Self-hosting | Docker Compose, Apache-2.0 | Docker or binary, FSL-1.1-Apache-2.0 |
| Free plan | 500 MB database, 1 GB files, 2 active projects, pauses after 1 week idle | 1M function calls/month, 0.5 GB database, 1 GB files |
| Paid entry | Pro from $25/month per organisation, plus compute | Professional $25 per developer/month, plus usage |
The core difference: where your logic lives
Supabase gives you a Postgres database and lets the frontend talk to it fairly directly. The client library turns supabase.from('todos').select() into a REST call against PostgREST, and Postgres decides what each user may see using row-level security. Anything more complex goes in a SQL function, an Edge Function, or a separate backend you run. Your schema is ordinary SQL: tables, foreign keys, joins, indexes, migrations.
Convex puts a layer of your own TypeScript between the client and the data. You write three kinds of functions in a convex/ folder:
- Queries read data and are automatically reactive.
- Mutations write data. Convex's docs say mutations run transactionally: all writes in one mutation commit together.
- Actions call the outside world (Stripe, an LLM API, email) and can run mutations afterwards.
The frontend calls those functions by name with full type safety. There's no SQL, and no policy language to learn. Access control is just an if statement in a function, which many people find easier to reason about than RLS. The trade-off is that your data access is only reachable through Convex's functions and client libraries.
Realtime
This is Convex's headline feature. Its docs explain that Convex tracks every database read a query function makes, and when any of that data changes, every subscribed client gets the new result. All subscriptions update to the same database snapshot, so a page never shows half-applied changes. You write useQuery(api.messages.list) in React and the list stays current with no extra code.
Supabase Realtime is a separate service with three features: Broadcast (send messages between clients), Presence (who's online) and Postgres Changes (listen to inserts, updates and deletes on a table). It works well, but you wire it up yourself: subscribe to a channel, merge the events into your local state, handle reconnects. Supabase's own docs note that Postgres Changes checks RLS for every event against every subscriber, so throughput scales with subscriber count, and they recommend Broadcast if you expect more than roughly 3,000 concurrent subscribers on the same changes.
If live updates are central to your app (chat, collaborative tools, dashboards, multiplayer anything), Convex's model saves real work. If realtime is a nice-to-have on one or two screens, Supabase covers it.
Auth
Supabase Auth is built in and mature: email and password, magic links, OAuth providers, phone login, and the user ID flows straight into your RLS policies. For a lot of apps this alone is the reason to choose Supabase. Compare it with other options in Clerk vs Auth0 vs Supabase Auth.
Convex offers Convex Auth, a first-party library configured in code. Its docs say plainly that it "doesn't support as many features as third-party solutions". The other documented paths are Clerk, WorkOS AuthKit, Auth0, or any OpenID Connect provider that issues JWTs. In practice many Convex apps pair it with Clerk.
Self-hosting and licences
Supabase is open source under Apache-2.0 and self-hosts with Docker Compose. Its self-hosting docs say you get a single project (Studio doesn't support multiple organisations or projects), and some platform features are not available: branching, managed backups and point-in-time recovery, advanced metrics, analytics and the Management API among them. You're responsible for backups, security and upgrades.
Convex publishes its backend on GitHub under the Functional Source License (FSL-1.1-Apache-2.0). You can use, modify and self-host it for anything except building a competing product, and each release converts to Apache-2.0 two years after it ships. That's source-available rather than OSI open source, though for running your own app it imposes nothing. Self-hosted Convex stores data in SQLite by default and can use Postgres or MySQL instead. Its README says it supports all free-tier cloud features, is community-supported via Discord, and that the Convex Auth CLI setup doesn't support self-hosted deployments yet.
Lock-in
Be honest with yourself about this one.
- Supabase's data is Postgres.
pg_dumpgets you everything, and the schema, SQL functions and most RLS policies run on any Postgres host. What you'd need to replace if you left is the auth service, storage API and the client-library calls. See Neon vs Supabase for what a database-only Postgres host looks like. - Convex's data is portable; your backend code is not. You can export your data and self-host the backend, so you're not stuck with Convex the company. But every query and mutation is written against Convex's API, so moving to a different database means rewriting the backend layer.
Pricing shape
Both have a free plan and a $25 entry point, but they meter different things.
- Supabase charges per organisation: Pro is from $25/month and includes $10/month of compute credits, enough for one Micro instance. Extra projects add their own compute. Free projects get 500 MB of database and are paused after a week of inactivity.
- Convex charges per developer on Professional ($25 per developer per month), with usage-based billing on top. The free and Starter plan includes 1M function calls a month, 0.5 GB of database storage and 1 GB of file storage, and Starter is pay-as-you-go beyond that.
A small team building a busy app may find Supabase's per-org pricing simpler. A solo developer with a modest app may never leave Convex's free tier. Prices change often, so check both pages before you commit.
Which suits AI-built apps?
Both work well with AI coding tools, for different reasons.
Supabase is the backend that app builders such as Lovable integrate with, and models have seen a vast amount of SQL and Supabase code. The risk is security: an AI that forgets an RLS policy can leave a table readable from the browser. If you go this way, review every policy. (new row violates row-level security)
Convex suits agent-written code surprisingly well because everything is TypeScript with generated types, so the compiler catches many mistakes before they run, and authorization lives in ordinary function code an agent can read. Convex also runs its own AI app builder, Chef, on this stack. The downside is that models have seen less Convex code than SQL, so expect the occasional made-up API.
How to choose
- You want SQL, joins, reporting, or to keep the option of plain Postgres: Supabase.
- You're using Lovable or a similar builder: Supabase, because that's what they integrate with.
- Your app is realtime-first (chat, collaboration, live dashboards): Convex.
- You want one language end to end, with no policy language or ORM: Convex.
- Licence or self-hosting policy requires OSI open source today: Supabase.
- Still unsure: read which database an AI-built app should use and SQL vs NoSQL, then build one small feature in each. You'll know within an afternoon.
EasySpawn runs Postgres on your own server next to your app with a ready DATABASE_URL, if you'd rather skip a separate backend platform entirely. See how it works or join the waitlist.
Related: Supabase Row-Level Security Explained (for People Who Didn't Write the Policies) · Clerk vs Auth0 vs Supabase Auth: Which Should Handle Your Logins? · Neon vs Supabase: Which Postgres Platform Should You Use? · "new row violates row-level security policy" in Supabase: How to Fix It
Keep reading
Redis vs Valkey: Licences, Compatibility and Which to Pick in 2026
Redis vs Valkey explained: the 2024 licence change, the Linux Foundation fork, Redis 8's AGPLv3 option, compatibility, managed services and how to choose.
Drizzle vs Prisma: Which TypeScript ORM Should You Use in 2026?
Drizzle and Prisma are the two leading TypeScript ORMs. Drizzle is SQL-shaped, lightweight and schema-in-TypeScript; Prisma has its own schema language, a higher-level query API and, since Prisma 7, a Rust-free client. How they compare on schema, queries, migrations, serverless, performance and AI-assisted coding.