Skip to content

UUID Generator

Generate UUID v4, v1, and v7 identifiers. Bulk generation, copy to clipboard, and optional hyphen removal.

3658fbd4-c795-4aad-b904-77d0a898dd4b

UUID versions explained

UUID v4 is the most widely used version. It fills 122 of the 128 bits with cryptographically random data, producing identifiers with near-zero collision probability. PostgreSQL's gen_random_uuid(), Python's uuid.uuid4(), and JavaScript's crypto.randomUUID() all produce v4 UUIDs.

UUID v7: sortable by time

UUID v7 (RFC 9562) embeds a Unix timestamp in milliseconds in the first 48 bits, followed by random data. This makes v7 UUIDs lexicographically sortable by creation time. Database B-tree indexes benefit from this ordering because new rows always insert at the end, reducing page splits and fragmentation. If you use UUIDs as primary keys in PostgreSQL or MySQL, v7 is the strongest choice for write-heavy workloads.

UUID v1: MAC address and timestamp

UUID v1 combines a 60-bit timestamp with the generating machine's MAC address. This guarantees uniqueness across machines but leaks hardware identifiers. Many projects avoid v1 for this privacy reason. The simplified v1 implementation in this tool uses random node data instead of a real MAC address to avoid that concern.

UUIDs vs auto-incrementing IDs

Auto-incrementing integers are compact and fast but expose record counts, require a central sequence, and conflict in distributed systems. UUIDs solve all three problems at the cost of 16 bytes per identifier. For APIs and distributed services, UUIDs are the standard. For single-database applications with tight storage requirements, sequential integers still make sense. Our Hash Generator can produce deterministic identifiers from input data when you need reproducible IDs.

Frequently Asked Questions

What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 9562. UUIDs are designed to be unique across space and time without requiring a central authority.
Which UUID version should I use?
UUID v4 is the most common choice. It uses random data and works well for database primary keys, session tokens, and general-purpose identifiers. UUID v7 is newer and sortable by creation time, making it better for database indexes.
Are UUIDs guaranteed to be unique?
UUID v4 uses 122 bits of random data, giving roughly 5.3 x 10^36 possible values. The probability of a collision is vanishingly small. For all practical purposes, you can treat them as unique.
Is anything sent to a server?
No. All UUID generation happens in your browser using crypto.randomUUID() and Math.random(). Nothing is transmitted over the network.