Generates spec-compliant MongoDB ObjectIds
Generates spec-compliant MongoDB ObjectIds without requiring a MongoDB connection.
500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.
Generate MongoDB-compatible ObjectIds and decode existing ones to extract their embedded timestamp, machine, and counter fields.
The MongoDB ObjectId Generator creates valid BSON ObjectIds compatible with MongoDB and decodes existing ObjectIds to reveal their internal structure. A MongoDB ObjectId is a 12-byte value: 4 bytes for a Unix timestamp (second precision), 5 bytes of random machine/process data, and 3 bytes of incrementing counter. ObjectIds are the default _id type in MongoDB collections and are designed to be unique across machines and time without central coordination. This tool lets you generate fresh ObjectIds, inspect the creation time encoded in any ObjectId, and convert between hex and binary representations.
Generates spec-compliant MongoDB ObjectIds without requiring a MongoDB connection.
Decodes ObjectIds to reveal the embedded creation timestamp.
Useful for debugging, testing, and seeding MongoDB databases.
Runs entirely in the browser — no driver or database needed.
Half the size of a UUID v4 hex (24 vs 32 chars) while still embedding a useful timestamp prefix.
Default _id type in every MongoDB collection — using ObjectId keeps your schema idiomatic and your indexes compact.
Input: Click Generate
Output: 65b3c2f1a8d9e4f1a2b3c4d5
Input: 5f4e1c9d8b7a6f5e4d3c2b1a
Output: Timestamp: 2020-09-01T16:30:21.000Z Random: 8b7a6f5e4d Counter: 3c2b1a
Input: Timestamp: 2020-01-01T00:00:00Z
Output: 5e0be100a1b2c3d4e5f60718
Input: Count: 3
Output: 65b3c2f1a8d9e4f1a2b3c4d5 65b3c2f1a8d9e4f1a2b3c4d6 65b3c2f1a8d9e4f1a2b3c4d7