Generate UUIDs v4 (random) and v7 (time-ordered). Bulk mode, multiple formats, copy with one click. Runs entirely in your browser.
A UUID (Universally Unique Identifier) is a 128-bit identifier that is unique across space and time. Also known as a GUID (Globally Unique Identifier) in Microsoft ecosystems. UUIDs are used in databases, distributed systems, APIs, session tokens, and anywhere you need a guaranteed-unique ID without coordination.
| Feature | UUID v4 | UUID v7 |
|---|---|---|
| Generation | Fully random | Time-ordered + random |
| Sortable | No | Yes (chronological) |
| Database performance | Random index fragmentation | Sequential, B-tree friendly |
| Timestamp embedded | No | Yes (Unix ms) |
| Best for | General purpose IDs | Database PKs, event logs |
A standard UUID looks like: 550e8400-e29b-41d4-a716-446655440000
It's 32 hexadecimal digits displayed in 5 groups separated by hyphens: 8-4-4-4-12. The version number is encoded in the 13th character.
JavaScript: crypto.randomUUID()
Python: import uuid; uuid.uuid4()
Go: uuid.New() (google/uuid package)
PostgreSQL: gen_random_uuid()
UUID (Universally Unique Identifier) is a 128-bit identifier formatted as 8-4-4-4-12 hexadecimal characters (e.g., 550e8400-e29b-41d4-a716-446655440000). UUIDs are used to uniquely identify records in databases, distributed systems, and APIs without needing a central authority to coordinate ID assignment.
UUID v1 is generated using the current timestamp and MAC address, making it time-ordered but potentially revealing hardware information. UUID v4 is purely random (122 random bits), making it the most common choice for privacy and security. Version 4 is recommended for most use cases where time-ordering isn't needed.
GUID (Globally Unique Identifier) is Microsoft's term for UUID. They are functionally identical — both are 128-bit identifiers in the same format. You'll see "UUID" in Unix/web contexts and "GUID" in Windows/.NET contexts, but they interoperate perfectly across all platforms and languages.
UUID v4 has 122 bits of randomness, giving 2^122 (roughly 5.3 × 10^36) possible values. The probability of generating a duplicate is astronomically small — you'd need to generate 1 billion UUIDs per second for 85 years before having even a 50% chance of a single collision.
Yes, UUIDs are commonly used as primary keys, especially in distributed systems where multiple servers generate records independently. The main trade-off is that random UUID v4 values cause index fragmentation in databases like PostgreSQL and MySQL. Consider UUID v7 (time-ordered) for better index performance.