UUID v4 Generator

The UUID v4 generator creates random universally unique identifiers that follow the RFC 4122 standard, the same format used by databases, APIs and distributed systems around the world. A version 4 UUID is a 128 bit value written as 32 hexadecimal digits in five groups separated by hyphens, such as 3b12f1df-5232-4804-897e-917bf397618a, with a 4 in the version position and one of 8, 9, a or b in the variant position. Because the bits are drawn from secure randomness, two generated values are effectively guaranteed never to collide, which makes UUIDs ideal for primary keys, request identifiers, file names and idempotency tokens where you cannot rely on a central counter. This tool uses the browser crypto random source, so the values are cryptographically strong rather than the weaker output of a plain pseudo random function. Enter how many you need and the generator produces that many identifiers at once, one per line, ready to copy into your code, your database seed or a test fixture. Developers, testers and anyone wiring up systems use it to mint identifiers without installing a library. A few good habits help. Store UUIDs as a native uuid type where your database supports one, since that is faster and smaller than text. Keep the lowercase, hyphenated form for consistency across systems. If you need ordered or time sortable identifiers for index performance, consider a different scheme, because v4 values are deliberately random and do not sort by creation time. Everything is generated locally in your browser, so no identifier is ever sent to or logged by a server.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Premium Homes: warmer, drier, healthier. No condensation, ever.
Advertise on this page

Random RFC 4122 version 4 UUIDs generated in your browser. Nothing is uploaded.

How it works

The tool draws 16 random bytes from the browser secure random source for each identifier, then forces the version digit to 4 and the variant digit to one of 8, 9, a or b as the standard requires. The bytes are written as 32 hexadecimal characters and split into the familiar 8-4-4-4-12 hyphenated groups.

Worked example

Asking for 5 UUIDs returns five lines, each a value like 3b12f1df-5232-4804-897e-917bf397618a. Every line is different and freshly random each time you calculate.

Related calculators