Skip to content
QKQuickKit日本語
Identifiers & AuthLOCALRuns in your browser

MongoDB ObjectId Timestamp Decoder

Read the creation timestamp out of a 12-byte MongoDB ObjectId, plus the remaining bytes as raw hex, entirely in the browser.

This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.

Decoded

Decoded
Creation timestamp (UTC)
Timestamp (Unix seconds)
Timestamp (Unix ms)
Timestamp bytes (hex)
Bytes 5–9 (hex)
Counter bytes (hex)
Counter (decimal)
Normalized ObjectId
How it works

A MongoDB ObjectId is 12 bytes, shown as 24 hexadecimal characters. The first 4 bytes are a big-endian count of seconds since the Unix epoch — the document's creation time, the same value `ObjectId.getTimestamp()` returns. This tool decodes that timestamp and shows the rest of the bytes as raw hex only. In the current ObjectId format (MongoDB 3.4 and later) bytes 5-9 are a per-machine, per-process random value and bytes 10-12 are a big-endian counter; before 3.4 the layout was a 3-byte machine identifier, a 2-byte process id, and a 3-byte counter. Because that middle section is not portable, bytes 5-9 are labelled by position, not meaning, and are never attributed to a host, process, or user. Paste a bare id or an `ObjectId("…")` wrapper. The counter bytes cannot be turned back into an insertion order across processes, and the second-resolution timestamp is not a precise insertion time.