Live CDC replication

Migrate MongoDB to
PlanetScale

Migrate MongoDB to PlanetScale with live CDC replication, automatic schema mapping, and zero downtime. Production-ready in minutes, not weeks.

Start migrating free →Read the docs

BSON Schema Detection

Automatically detect field types across all collections — ObjectId, ISODate, NumberInt, nested objects, and arrays — and map them to SQL equivalents.

ObjectId → VARCHAR(24)

MongoDB Oplog CDC

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

< 50ms latency

Type Coercion Engine

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

Auto type mapping

Zero Downtime Cutover

Oplog CDC keeps the SQL target current while MongoDB stays authoritative. Cut over when you're ready — NoSQLSync never writes to your source.

Live CDC sync

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 conforms to the inferred schema. Catch type mismatches early. Drill down to individual offending documents.

Pre-flight checks
How it works

Three steps to PlanetScale

1
Connect your MongoDB
Paste your MongoDB connection string. NoSQLSync detects all collections/tables and samples documents/items to infer the full schema — including nested structures.
2
Review the schema & map columns
Our auto-mapper converts MongoDB types to PlanetScale types. Review and adjust: rename columns, change types, flatten nested structures, or use JSON/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 your SQL target in sync until cutover.

Type mapping: MongoDBPlanetScale

PlanetScale speaks the MySQL wire protocol. Connect it as a MySQL target using your PlanetScale connection string — every MySQL type mapping below applies unchanged.

ObjectId / String IDCHAR(36) / VARCHAR(255)Identifier as string-based primary key
StringVARCHAR(n) / TEXT / LONGTEXTConfigurable length limits
Number / IntegerINT / BIGINTNumeric types
Double / DecimalDOUBLE / DECIMALFloating point or fixed precision
Date / TimestampDATETIME / TIMESTAMPDate/time columns
BooleanTINYINT(1)MySQL boolean convention
Array / ListJSONMySQL native JSON type
Object / Map / Nested docJSONFlexible schema fields as JSON
Binary / BytesBLOB / MEDIUMBLOBBinary data support
Null / MissingNULLNullable columns

Frequently asked questions

What happens to embedded documents and arrays?

Embedded documents become JSONB columns by default, with full PostgreSQL indexing support. You can optionally flatten specific fields into their own columns using the visual schema mapper.

How are MongoDB ObjectIds handled?

An ObjectId is stored as its 24-character hex string — VARCHAR(24) on PostgreSQL, MySQL, Snowflake, Redshift and MariaDB, NVARCHAR(24) on SQL Server, STRING on BigQuery and ClickHouse. The _id field becomes the table's primary key. Values are preserved exactly, so an ObjectId reference stored in another collection still matches after migration.

Can I migrate only specific collections?

Yes. Choose which MongoDB collections to migrate. Each collection becomes a separate SQL table. Filter documents with queries to migrate only a subset.

How long does a migration take?

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

Is my data secure during migration?

Yes. All data is encrypted in transit (TLS 1.3) and at rest (AES-256). Database credentials use short-lived tokens. Migration workers run in an isolated environment and never store data after the job completes.

Can I roll back if something goes wrong?

Yes. NoSQLSync only reads from your source — it is never modified, and CDC keeps running until you stop it. If you hit a problem after cutover, point your application's connection string back at the source.

Other migration paths from MongoDB

See the full MongoDB migration guide →

MongoDBPostgreSQLMongoDBMySQLMongoDBBigQueryMongoDBSnowflakeMongoDBRedshiftMongoDBClickHouseMongoDBSQL ServerMongoDBMariaDBMongoDBSupabaseMongoDBNeon

Ready to migrate to PlanetScale?

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

Start free migration →View pricing