ID Generator

Generate and decode UUID, BSON ObjectID, NanoID, ULID and Snowflake IDs. All client-side, instant.

Generate ObjectID

Decode ObjectID

21

Decode Snowflake ID

📊 ID Format Reference

FormatLengthUniquenessSortableUse Case
UUID v436 chars122 bits randomNoGeneral purpose, database keys
UUID v136 charsTime + MAC~YesDistributed systems (MAC leak risk)
UUID v736 charsTime + randomYesModern databases, sort-friendly
BSON ObjectID24 hex12 bytesYesMongoDB documents
NanoID21 chars~126 bitsNoURLs, short IDs, filenames
ULID26 chars128 bitsYesLogs, events, sort-friendly IDs
Snowflake~18 digits64 bitsYesDiscord, Twitter, distributed IDs

❓ FAQ

What is the difference between UUID v4 and v7?

UUID v4 is fully random. UUID v7 has a Unix timestamp prefix, making it time-sortable — ideal for database indexes where insertion order matters.

Is NanoID safer than UUID?

NanoID uses URL-friendly characters and is more compact (21 chars vs 36), with comparable collision resistance. It's better for URLs and short IDs.

Can I decode a BSON ObjectID timestamp?

Yes! The first 4 bytes of a 12-byte ObjectID encode the Unix timestamp. Paste any 24-char hex ObjectID above to extract it.

What epoch does Snowflake use?

Discord uses 2015-01-01, Twitter/X uses 2010-11-04. Select the right epoch above or use Unix epoch (0) for custom implementations.

Are these IDs generated securely?

All IDs use crypto.getRandomValues() for cryptographic randomness. Nothing is sent to any server — everything runs in your browser.