FreeDev Tools

MongoDB ObjectId Generator

Generate MongoDB ObjectIds or decode the embedded creation timestamp from existing ones.

Runs locally in your browser. Your input is not uploaded.

How to Use

  1. 1

    Generate or decode

    Empty input generates new IDs; pasted IDs are decoded.

  2. 2

    Read the breakdown

    Decoded IDs show creation time, random bytes, and counter.

  3. 3

    Copy the results

    Use generated IDs in tests, fixtures, and seeds.

Frequently Asked Questions

The 12-byte default primary key in MongoDB: a 4-byte unix timestamp, 5 random bytes, and a 3-byte counter — shown as 24 hex characters. IDs sort roughly by creation time.