Hashes/Crypto
UUID Generator
Generate UUID versions 1, 3, 4, 5, 6 and 7 — random, time-based, and name-based.
A UUID (Universally Unique Identifier) is a 128-bit identifier that's unique in practice without a central registry: two independent servers can generate one at the same moment and almost never collide. The versions differ in how they're generated.
Which version to pick
- v4 — fully random, the most common choice for database record IDs, session keys, and similar cases.
- v1 and v6 — based on creation time; v6 carries the same content as v1 but with the fields reordered so it sorts naturally — handy as a primary key.
- v3 and v5 — deterministic, derived from a namespace and a name (v3 uses MD5, v5 uses SHA-1) — the same input always produces the same UUID.
- v7 — the newest standard: a millisecond Unix timestamp plus a random part, sortable by time like v1/v6, but without a MAC address.
Common uses
- Primary keys in databases where auto-increment doesn't fit (distributed systems, offline-first apps).
- Session IDs, request IDs for tracing, temporary file names.
- Deterministic IDs (v5) for objects that need the same identifier across different systems given the same name.
Things to keep in mind
UUID v1 and v6 embed the generating device's MAC address — avoid them if that's an unwanted disclosure.
The format is 32 hexadecimal characters grouped with hyphens as 8-4-4-4-12 (e.g. 550e8400-e29b-41d4-a716-446655440000).
Article about this tool: UUID: how identifiers that almost never repeat are generated
Frequently asked questions
What's the difference between UUID v4 and other versions?
UUID v4 is generated from random or pseudo-random numbers, making it the simplest choice with no dependency on time or hardware identifiers. Other versions like v1 encode a timestamp and MAC address, or v5 derive a UUID deterministically from a namespace and name.
How likely is it that two generated UUIDs collide?
Extremely unlikely. A v4 UUID has 122 random bits, so you'd need to generate billions of UUIDs per second for centuries before a collision became statistically probable.
Are the UUIDs generated here sent anywhere?
No. Generation happens entirely in your browser using a cryptographically secure random source — nothing is sent to a server.
What is UUID v7 and why is it better than v4 for databases?
UUID v7 embeds a timestamp in the leading bits, so values sort naturally by creation time — unlike a fully random v4, which hurts database index performance due to the chaotic insert order of new rows.
Can I use a UUID as a secret token?
For UUID v4 — yes, since it's generated by a cryptographically secure random source. But UUID v1 partially reveals the creation time and the device's MAC address, so it's unsuitable where unpredictability is required.