Most popular migration path

Migrate MongoDB to
PostgreSQL

Live CDC replication, automatic schema mapping from BSON to SQL, and zero downtime. Production-ready in minutes, not weeks.

Start migrating free →Read the docs

Auto Schema Mapping

BSON ObjectId automatically maps to UUID. Nested documents become JSONB columns. Arrays turn into PostgreSQL arrays or JSONB — your choice.

ObjectId → UUID

Live CDC Replication

Tail the MongoDB oplog in real time. Every insert, update, and delete flows to PostgreSQL with sub-second latency. Zero data loss guaranteed.

< 50ms latency

Type Coercion Engine

MongoDB's flexible types don't break your schema. ISODate → TIMESTAMPTZ, NumberInt → INTEGER, Double → DOUBLE PRECISION. Custom overrides available.

Auto type mapping

Zero Downtime Cutover

Dual-write mode keeps MongoDB and PostgreSQL in sync during migration. Cut over to PostgreSQL as your primary when you're ready — with automatic rollback.

Dual-write mode

Incremental Sync

Migrate historical data in bulk, then keep new writes in sync via CDC. No need to pause your application. Works with collections of any size.

Bulk + streaming

Schema Validation

Before migrating, validate that every document in your collection conforms to the inferred schema. Catch type mismatches early. Drill down to individual offending documents.

Pre-flight checks
How it works

Three steps to PostgreSQL

1
Connect your MongoDB
Paste your MongoDB Atlas connection string. NoSQLSync detects all collections and samples documents to infer the full schema — including nested objects and arrays.
2
Review the schema & map columns
Our auto-mapper converts BSON types to PostgreSQL types. Review and adjust: rename columns, change types, flatten nested documents, or use JSONB for flexible fields.
3
Launch migration & monitor
Click launch. Watch records flow in real time with throughput charts, latency metrics, and error alerts. Enable live CDC to keep PostgreSQL in sync until cutover.

Type mapping reference

ObjectIdUUIDMongoDB's 12-byte identifier becomes a standard UUID type
StringTEXT / VARCHAR(n)Configurable max length or unlimited TEXT
NumberIntINTEGER32-bit signed integer
Double / NumberDecimalDOUBLE PRECISION / NUMERICFloating point or arbitrary-precision numeric
ISODate / DateTIMESTAMP WITH TIME ZONEFull timezone-aware timestamps
BooleanBOOLEANStandard true/false
ArrayJSONB / ARRAYNested arrays as JSONB or typed PostgreSQL arrays
Object / nested docJSONBFlexible schema fields as JSONB with indexing support
Binary / BinDataBYTEABinary data support
NullNULL (nullable column)MongoDB nulls become SQL-compliant NULL values

Common questions

How long does a MongoDB to PostgreSQL migration take?

A typical 100 GB collection migrates in under 2 hours with bulk mode. With CDC enabled, ongoing writes sync in real time. Total cutover time depends on your data volume and network throughput.

Do I need to modify my application code?

After migration you'll connect to PostgreSQL instead of MongoDB. Your data model may change (e.g., nested documents become JSONB columns), so your queries may need updating. We provide PostgreSQL-friendly schema recommendations.

What happens to nested documents and arrays?

Nested documents are flattened into JSONB columns by default, which PostgreSQL indexes natively. You can optionally flatten specific fields into their own columns using the visual schema mapper.

Is my data secure during migration?

Yes — all data is encrypted in transit (TLS 1.3) and at rest (AES-256). We never store your migration data beyond the duration of the job.

Can I migrate only specific collections?

Yes. You choose which MongoDB collections to migrate. Each collection becomes a separate PostgreSQL table. You can also filter documents with a query to migrate only a subset.

What PostgreSQL versions do you support?

PostgreSQL 12 through 17. We support both self-hosted PostgreSQL, Amazon RDS/Aurora, Google Cloud SQL, Azure Database for PostgreSQL, and Supabase.

Ready to migrate to PostgreSQL?

Connect your MongoDB and PostgreSQL instances. No credit card required.

Start free migration →