Generate Universally Unique Identifiers (UUIDs) in various versions for unique identification
UUID Generator
Generate Universally Unique Identifiers (UUIDs) in various versions for unique identification
UUID Generation Settings
Time-based UUIDs
Random UUIDs
Hash-based UUIDs
UUID Best Practices
- Default Choice: Use UUID v4 for most applications - it's secure and widely supported
- Database Keys: Consider using sequential UUIDs (v1) for better index performance
- Deterministic IDs: Use v5 when you need consistent UUIDs from the same input
- Storage: Store as binary (16 bytes) rather than string (36 chars) when possible
- Validation: Always validate UUID format when receiving from external sources
UUIDv4 for new things, UUIDv7 if the database index performance matters
Most of the time you just need a UUID and version doesn't matter much. Pick v4, generate, copy, done. Where version does matter is when UUIDs become database primary keys. Random v4 UUIDs scatter across a B-tree index unpredictably — every insert causes a page split somewhere, which adds up to measurable write overhead at scale. UUIDv7 bakes a millisecond timestamp into the first 48 bits, so new records are always appended near the end of the index. The difference isn't noticeable with a few thousand rows. It starts showing up around a million records, and by 100 million it's significant. If you're already running Postgres with a large table and sluggish inserts, switching new records to v7 (or ULID if you want the same property with slightly better human readability) is worth the migration cost.
Bulk generation and format options are on the same page
You can generate up to 100 UUIDs at once and copy all of them as a newline-separated list. Format options include standard xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, no-dash xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, and braced {xxxxxxxx-...} for systems that expect the Microsoft GUID format. The braced format is mostly encountered with SQL Server and COM interfaces — elsewhere the standard dashes-only format is expected. If you're seeding test data, the bulk option with a raw list is faster than copying one at a time from any other tool.
