Migrate MongoDB to Supabase (PostgreSQL)

Migrate your MongoDB database to Supabase PostgreSQL. Get real-time subscriptions, Row Level Security, and the full Supabase ecosystem.

Start free →
The Problem

You're building on Supabase for its real-time subscriptions, Row Level Security, authentication, and generous free tier — but your existing application data is in MongoDB. You need to migrate historical data and keep new writes flowing while your team rewrites application queries from MQL to Supabase's PostgreSQL client.

The Solution

NoSQLSync migrates your MongoDB data to Supabase PostgreSQL. Enable CDC to keep Supabase in sync while you transition your application queries. MongoDB keeps handling your writes, so you can point read traffic at Supabase and compare. Once your app is fully ported to PostgreSQL, cut over completely.

Key Benefits

Leverage Supabase Realtime

Once your data is in PostgreSQL, Supabase's real-time subscriptions broadcast changes to your frontend via WebSockets. No need for a separate real-time layer.

Row Level Security (RLS)

Supabase's RLS policies give you database-level authorization. Define who can read/write which rows — enforced at the database, not in application code.

Built-in auth integration

Supabase Auth integrates directly with PostgreSQL. User IDs are database foreign keys. Authenticated users only access their own data — automatically.

Generous free tier

Supabase's free tier includes 500MB database and 2GB bandwidth. Combined with NoSQLSync's free migration plan, you can port your app at zero cost.

Managed PostgreSQL

No more managing your own database. Supabase handles backups, scaling, and maintenance. Focus on building your app.

How to set it up

1
Connect MongoDB & Supabase
Connect NoSQLSync to your MongoDB instance and your Supabase project's PostgreSQL connection string.
2
Map schema to PostgreSQL
Use the visual mapper to review the inferred columns, flatten nested documents, and set up column types optimized for Supabase.
3
Bulk migrate + enable CDC
Migrate all existing data, then enable CDC. Both databases stay in sync while you update your application code.
4
Test Supabase reads
With CDC running, point a small percentage of read traffic at Supabase while MongoDB still takes the writes. Confirm the results match, and fix any mapping issues.
5
Cut over to Supabase
When your application is fully tested against PostgreSQL, switch all traffic to Supabase and decommission MongoDB.

Frequently asked questions

Does this work with Supabase's free tier?

Yes. Both NoSQLSync (5 free migrations/month) and Supabase (500MB free database) have generous free tiers. You can complete a proof-of-concept migration at zero cost.

What about Supabase-specific features like Realtime?

Once data is in PostgreSQL, Supabase Realtime works automatically. Any table changes are broadcast via WebSockets to subscribed clients.

How do I handle MongoDB relationships in PostgreSQL?

Each collection becomes its own table and ObjectId values are preserved as their hex strings, so a reference stored in one collection still matches the _id it points at. NoSQLSync does not generate foreign key constraints for you — add them in PostgreSQL once the tables are in place, and you can JOIN on those columns.

Solve your migration challenge today

Free plan includes 5 migrations per month. No credit card required.

Start free →