MongoDB ObjectId Timestamp Decoder
Decode the timestamp field from MongoDB ObjectIds. Compare UTC and a selected local zone while preserving invalid input rows.
Starts with an editable example. Replace the dates and rules with your own.
Your calculation
Ready when you are
Choose your dates.
Select your counting rules and calculate.
Calculation details
| Step | Value |
|---|
How to use this calculator
Paste one 24-character hexadecimal ObjectId per line and choose a display zone.
The first four bytes encode unsigned Unix seconds. Other bytes are not interpreted as time. A client can construct or supply an ObjectId, so its timestamp is not proof of insertion time.
A worked example
ObjectId 507c7f79bcf86cd7994f6c0e contains the timestamp October 15, 2012 at 21:26:17 UTC.
Can ObjectIds prove the order of records within one second?
The timestamp field alone cannot. This tool reports its one-second precision without inferring a database ordering guarantee.
Which calendar and years are supported?
Each result states its calendar, time scale, precision and supported range. Batch converters accept up to 100 nonempty input lines and retain invalid rows. Copy, CSV and print include the calculation rules. Calendar downloads appear when a result contains dated events. Calculations run in your browser; no reminders or jobs are scheduled.
What happens to my dates?
Calculations run on your device. Saving a calculation is optional and keeps it in this browser. A setup link contains the dates and settings you entered; anyone with the link can read them. Use one tab per saved calculator. Clear saved data from Privacy & settings.