MongoDB ObjectId Generator
Create 12-byte ObjectId samples using a current or custom UTC timestamp, one page-session random value, and an incrementing counter.
Generation and decoding run locally. Nothing is uploaded, saved, or sent to a database.
Modern format: 4-byte unsigned Unix timestamp in seconds, 5 random bytes generated once for this page session, and a randomly initialized 3-byte counter. Timestamp and counter are big-endian; the counter increments modulo 16,777,216. Reloading starts a new random page session.
Custom UTC input must be YYYY-MM-DDTHH:mm:ssZ and a real calendar date from Unix second 0 through 4,294,967,295 (1970-01-01T00:00:00Z through 2106-02-07T06:28:15Z). Batch size is 1–1,000 whole numbers. These are samples, not security tokens or a guarantee of global uniqueness.
No. This modern 5-byte random field is not a reversible machine or process identifier. Decoding exposes only the timestamp, raw random bytes, and counter.
A QUICK WALKTHROUGH
How to use this tool
- Choose the current time or enter an exact UTC date and time.
- Generate 1–1,000 samples and copy the hexadecimal output.
- Decode one 24-digit hexadecimal ObjectId to inspect its fields.
Generated ObjectIds
Modern format: 4-byte unsigned Unix timestamp in seconds, 5 random bytes generated once for this page session, and a randomly initialized 3-byte counter. Timestamp and counter are big-endian; the counter increments modulo 16,777,216. Reloading starts a new random page session.
Custom UTC timestamp
Custom UTC input must be YYYY-MM-DDTHH:mm:ssZ and a real calendar date from Unix second 0 through 4,294,967,295 (1970-01-01T00:00:00Z through 2106-02-07T06:28:15Z). Batch size is 1–1,000 whole numbers. These are samples, not security tokens or a guarantee of global uniqueness.
Generation and decoding run locally. Nothing is uploaded, saved, or sent to a database.
Generation and decoding run locally. Nothing is uploaded, saved, or sent to a database.
GOOD TO KNOW
Common questions
Can the random bytes reveal a machine or process?
No. This modern 5-byte random field is not a reversible machine or process identifier. Decoding exposes only the timestamp, raw random bytes, and counter.
Timestamp mode
Custom UTC input must be YYYY-MM-DDTHH:mm:ssZ and a real calendar date from Unix second 0 through 4,294,967,295 (1970-01-01T00:00:00Z through 2106-02-07T06:28:15Z). Batch size is 1–1,000 whole numbers. These are samples, not security tokens or a guarantee of global uniqueness.