UUID Generator Guide: What Are UUIDs and How to Use Them
Learn about UUIDs (Universally Unique Identifiers), the different versions (v1, v4, v7), and when to use each one.
Universally Unique Identifiers (UUIDs) are 128-bit labels used for unique identification in computer systems. Here's everything you need to know.
What is a UUID?
A UUID is a 128-bit number represented as 32 hexadecimal digits in the format 8-4-4-4-12 (e.g., 550e8400-e29b-41d4-a716-446655440000). The total number of possible UUIDs is approximately 3.4 x 10^38 — enough to generate billions per second for centuries without collision.
UUID Versions
- UUID v1 — Based on timestamp and MAC address. Includes time information that can be extracted.
- UUID v4 — Based on random numbers. Most common version, 122 bits of randomness, used for most applications.
- UUID v7 — Based on timestamp with random suffix. Sortable by creation time, ideal for database primary keys.
When to Use UUIDs
- Database primary keys (especially in distributed systems)
- API resource identifiers
- Session tokens
- Order and transaction IDs
- File names (to avoid collisions)
UUID v4 vs UUID v7
UUID v4 is purely random and most widely supported. UUID v7 is time-ordered, which means database indexes work more efficiently (sequential inserts instead of random). For new projects, UUID v7 is often the better choice for database primary keys.
Try our UUID Generator — supports v1, v4, and v7 with batch generation up to 100 UUIDs at once.
Taskly Team
The Taskly team is dedicated to providing the best free online tools and educational content.
Enjoyed this article?
Subscribe to our newsletter to get the latest articles and tools as soon as they are published.
Newsletter
Get the latest tools and articles in your inbox