MongoDB ObjectId Parser and Generator
A MongoDB ObjectId is 12 bytes: the first 4 bytes are the Unix seconds of creation. Paste one to see its timestamp and fields.
Click "Generate ObjectId" for a well-formed random ObjectId to build local test data.
Features
- Timestamp recovery — From the first 4 bytes, recover the second-level creation time and show UTC and local time.
- Field breakdown — Shows machine, process and incrementing counter so you can trace an ID's origin.
- Local generation — One click generates a well-formed ObjectId without a MongoDB instance.
How to use
- Paste a 24-hex ObjectId on the left.
- The right side instantly shows the timestamp and fields; a format error is flagged.
- Click "Generate ObjectId" to get a new random ID.
FAQ
Is the ObjectId time accurate?
The first 4 bytes are the second-level Unix time of creation, precise to the second; it is client-generated and usually reflects the creation moment.
Does the generated one match the database?
The structure is identical (time plus random machine/process plus counter), but machine and counter are random fill for local testing, not a real instance.
Does this page collect my data?
No. The content is either baked into the HTML at build time or every calculation runs locally in your browser, so your input is never sent to any server. Apart from the footer traffic counters (Baidu Analytics and our self-hosted visitor counter, see the privacy policy), this site collects nothing about your visit.