UUID Generator

Generate v4 UUIDs and other random IDs from your browser's crypto RNG.

About UUIDs

A UUID (or GUID) is a 128-bit identifier designed to be unique without any central authority handing out numbers. Version 4 β€” the kind generated here β€” is almost entirely random: 122 random bits, with the remaining 6 fixed to mark the version and variant.

Alongside standard UUIDs you can generate uppercase and un-hyphenated variants, the braced Microsoft GUID form, short URL-safe IDs, and raw hex tokens for sessions or API keys. All of it comes from crypto.getRandomValues and never leaves the page.

Are collisions actually possible?

In principle yes, in practice no. With 122 random bits there are about 5.3 Γ— 10³⁢ possible v4 UUIDs. You would need to generate roughly 2.7 Γ— 10¹⁸ of them before the chance of a single collision reached 50% β€” at a million per second, that is around 85,000 years.

The practical risk is not the maths but a weak random source. A UUID generated from a poorly-seeded pseudo-random generator can collide far sooner, which is why this tool uses the browser's cryptographic RNG rather than Math.random().

Frequently asked questions

What is the difference between a UUID and a GUID?

None, functionally. GUID is Microsoft's name for the same 128-bit identifier. The braced form {xxxxxxxx-xxxx-...} is a Microsoft formatting convention, not a different type.

Are these UUIDs unique?

Effectively, yes. With 122 random bits from a cryptographic source, the chance of ever producing the same one twice is negligible β€” far smaller than the chance of a hardware fault corrupting the value.

Can I use a UUID as a database primary key?

Yes, and it is common for distributed systems since IDs can be created without coordination. The trade-off is that random UUIDs scatter inserts across a B-tree index. Where that hurts, a time-ordered format such as UUID v7 or ULID indexes better.

Is it safe to generate UUIDs on a website?

It is here, because generation happens entirely in your browser with the same cryptographic source used for encryption keys, and nothing is transmitted or logged.