SQL Formatter
Re-indent a SQL query into readable clauses, joins and conditions.
Generate and decode MongoDB ObjectIds, including their embedded timestamp.
The ObjectId tool generates valid 12-byte MongoDB identifiers and decodes existing ones into their creation time, machine bytes and counter — so you can read when a document was made without querying anything.
A MongoDB ObjectId is 12 bytes written as 24 hexadecimal characters: a four-byte timestamp in seconds, five random bytes identifying the process, and a three-byte counter. That structure is why ObjectIds are roughly ordered by creation time.
Generating them is useful for test fixtures and seed data that has to look real. Decoding is more often the point: paste an ObjectId from a document or a log and read the exact second it was created, without querying anything. Because the timestamp is only one-second resolution, the counter is what distinguishes documents created in the same second — which is why the generator increments it rather than re-randomising.
Four timestamp bytes, five stable random bytes and a three-byte counter, exactly as a MongoDB driver generates them.
Paste an _id from a document or a log and read the second it was created, with no database round trip.
Ids generated in the same second differ by their counter rather than being re-randomised, which is what the drivers do and what keeps them ordered.
Generate an ObjectId for a specific date, which makes seeded historical data look genuine.
Creation time and a stable process identifier, both of which matter if the id is ever public.
One or many; the timestamp is now unless you set one.
Generate an ObjectId for a specific date, which is handy for seeding historical data.
Paste one to read its creation time, machine bytes and counter.
Take the results to your clipboard or save them.
Yes, to the second. The first four bytes are a Unix timestamp, which is why MongoDB offers getTimestamp() on an ObjectId and why a created_at field is often redundant.
Roughly. They sort by second, then by counter within a process. Two ids from different processes in the same second have no defined order between them.
Yes — the format is documented and drivers generate them client-side anyway. They are what MongoDB inserts if you do not supply an _id.
They leak creation time to the second, and the five machine bytes are stable for a process. Do not use them as public identifiers where either fact matters.
What people who use the MongoDB ObjectId Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the MongoDB ObjectId Generator. It takes half a minute and no account.
Write the first reviewRe-indent a SQL query into readable clauses, joins and conditions.
Build text shadows, outlines and glows with a live preview.
Strip whitespace and optionally comments from XML, and see the bytes saved.
Convert a date into every ISO 8601 form, including week and ordinal dates.
Score a selector and find out which of two rules actually wins.
Encrypt text with a password using AES-GCM, and decrypt it back.
Encode and decode quoted-printable, the MIME encoding in every email header.
Draw an easing curve and see it against the standard ones.