UUID / GUID Generator
Generate UUID v4 (random) or v7 (time-sortable) in bulk. Copy individually or all at once.
- Choose UUID v4 (purely random, general purpose) or UUID v7 (time-sortable, recommended for database primary keys).
- Set the quantity (1–20) using the +/− buttons or by typing directly.
- Select a format: standard lowercase with hyphens, uppercase, or no hyphens.
- Click Generate. New UUIDs appear in the output panel.
- Click the copy icon next to any UUID to copy it individually, or click Copy All to copy the full list separated by newlines.
- Paste any UUID into the Validator below to inspect its version, variant, and (for v7) the embedded creation timestamp.
Tip: UUID v7 embeds a millisecond-precision Unix timestamp in the first 48 bits, making rows naturally sortable by creation time in any B-tree index — no extra timestamp column needed.
When would you use this?
- Generating unique primary keys for database records before inserting them.
- Creating idempotency keys for distributed API requests.
- Generating correlation IDs for log tracing across microservices.
What is the difference between v4 and v7?
UUID v4 is 122 bits of pure randomness — maximally unpredictable but unordered. UUID v7 encodes the current Unix timestamp (ms precision) in the first 48 bits, so rows inserted into a B-tree index remain sequential and avoid page splits, improving database write performance.
Are the generated UUIDs truly unique?
In practice, yes. UUID v4 has 122 random bits — the probability of a collision among one billion UUIDs is roughly one in a billion billion. UUID v7 has 74 random bits but still offers collision-safety for all practical applications.
What is the "variant" field?
The variant field (2–3 bits starting at bit 64) identifies the UUID layout standard. RFC 4122 / RFC 9562 UUIDs use the "10" bit pattern, which most UUIDs you encounter will show as "RFC 4122".
Is this implementation standards-compliant?
Yes. v4 uses crypto.randomUUID() when available (all modern browsers). The v7 implementation follows RFC 9562: 48-bit ms timestamp, 4-bit version (0111), 12-bit random_a, 2-bit variant (10), and 62-bit random_b.
No articles yet
No related articles are available yet. Please check back soon.