ID Generator
Generate and decode UUID, BSON ObjectID, NanoID, ULID and Snowflake IDs. All client-side, instant.
Generate ObjectID
Decode ObjectID
Decode Snowflake ID
📊 ID Format Reference
| Format | Length | Uniqueness | Sortable | Use Case |
|---|---|---|---|---|
| UUID v4 | 36 chars | 122 bits random | No | General purpose, database keys |
| UUID v1 | 36 chars | Time + MAC | ~Yes | Distributed systems (MAC leak risk) |
| UUID v7 | 36 chars | Time + random | Yes | Modern databases, sort-friendly |
| BSON ObjectID | 24 hex | 12 bytes | Yes | MongoDB documents |
| NanoID | 21 chars | ~126 bits | No | URLs, short IDs, filenames |
| ULID | 26 chars | 128 bits | Yes | Logs, events, sort-friendly IDs |
| Snowflake | ~18 digits | 64 bits | Yes | Discord, 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.