Suggest an editImprove this articleRefine the answer for “What is ObjectId?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)ObjectId is a special BSON data type used by MongoDB as a document's unique identifier in the `_id` field: it consists of 12 bytes (a timestamp, machine/process data, and a counter) and is generated so that a collision is practically impossible even across different machines. **Key point:** an ObjectId lets you tell when a document was created (the time is encoded in its first 4 bytes), and MongoDB generates `_id: ObjectId(...)` automatically if it isn't specified by hand.Shown above the full answer for quick recall.Answer (EN)ImageObjectId is a special BSON data type used by MongoDB as a document's unique identifier in the `_id` field. ### The main properties 1. **Uniqueness** An ObjectId is generated so that a collision is practically impossible, even across different machines. 2. **A 12-byte structure** It consists of: - 4 bytes, the creation time (timestamp), - 5 bytes, machine and process data, - 3 bytes, a counter. 3. **It holds a timestamp** An ObjectId lets you tell when a document was created, which is handy for logs and analytics. 4. **Auto-generation** MongoDB creates `_id: ObjectId(...)` automatically if it isn't set by hand. **Summary:** an ObjectId is a compact, unique document identifier with an encoded creation time, which MongoDB assigns by default.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.