UUID
507f1f77-bcf8-6cd7-9943-901100000000
The conversion zero-pads the 12 ObjectId bytes to 16, so it is reversible and preserves sort order by creation time. Note that the result is not a version-4 UUID — the version and variant bits carry ObjectId data. A NoSQLSync migration does not do this: it stores an ObjectId as its 24-character hex string. Use this when you have decided you want UUID keys and will convert every reference yourself.
Run it against your real database
NoSQLSync samples your collections, infers the schema, and migrates the data with live CDC. Free plan, no credit card.
Start free →