UUID Generator

UUID Generator

Make random version 4 UUIDs or time-ordered version 7 UUIDs — one or up to 1,000 at once — in lowercase or uppercase, with or without hyphens, in braces or as a URN. Switch to Inspect to check a UUID and read its version, variant and, for time-based UUIDs, the moment it was created. Everything runs in your browser.

1 to 1,000
  • Your UUIDs

    9ac70a6d-7348-4745-935b-53009351e63a 57f99f94-6e63-42a1-be21-90f21a957380 9a23d6f1-a6e0-4243-9839-0bc11e3fbebe e2a72f01-861b-4473-b1e7-6d3da23b5f03 f5c5762e-62ae-43fe-80fb-460bf9aa2fa4

VersionVersion 4 (random)
How many5
Random bits in each UUID122

Each UUID holds 122 random bits from your browser’s cryptographic random number generator. A duplicate becomes likely only after about 2.7 billion billion UUIDs. Generated in your browser; nothing is sent anywhere.

Calculated on your device · formulas checked against known results · How we test

How to use the UUID generator

  1. Choose Generate version 4 for random UUIDs, or Generate version 7 for UUIDs that sort by the time they were made.
  2. Set How many (up to 1,000) and the format: lowercase with hyphens, 32 digits without hyphens, in {braces} the way Windows and .NET write GUIDs, or as a URN (urn:uuid:…). Tick Uppercase letters if your system expects them.
  3. Press Copy to copy the whole list, one UUID per line, or Generate for a fresh set.
  4. To check a UUID you already have, choose Inspect or validate a UUID and paste it in any common form. You see whether it is well formed, its version and variant, and for version 1, 6 and 7 UUIDs the date and time it was created.

What a UUID is

A UUID (universally unique identifier) — Microsoft software calls it a GUID — is a 128-bit number written as 32 hexadecimal digits in groups of 8, 4, 4, 4 and 12. Anyone can create one without asking a central registry, and the chance of two colliding is so small that databases, APIs, file formats and operating systems use them as keys. The current standard is RFC 9562 (May 2024), which replaced RFC 4122.

Two places in every UUID are fixed. The 13th digit is the version, which says how the rest was made, and the 17th digit carries the variant: 8, 9, a or b for UUIDs of the RFC layout. That is why every version 4 UUID has the shape xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where y is 8, 9, a or b.

VersionMade fromSorts by time
1Time in 100 ns steps since 1582, a clock sequence and a node ID (often the MAC address)No
3 and 5MD5 or SHA-1 hash of a namespace and a name: the same name always gives the same UUIDNo
4122 random bitsNo
6Version 1’s fields, reordered so the time comes firstYes
748-bit Unix time in milliseconds, then 74 random bitsYes
8A custom layout chosen by the software that makes it—

Version 4 or version 7?

Version 4 is the classic choice: entirely random, it reveals nothing about when or where it was made. Its weak spot is the database index. Random keys land all over a B-tree, so each insert touches a different page, and large tables grow slower and fragmented. Version 7 starts with the current time, so new rows go to the end of the index, much like an auto-increment number — while still being unique across servers that never talk to each other. RFC 9562 recommends version 7 for new systems that need time-ordered IDs.

The trade-off is that a version 7 UUID tells anyone who sees it when it was created, to the millisecond. That is harmless for most records, but choose version 4 when the creation time is itself private — for example in a public link that shouldn’t reveal when an account was opened. Within a single millisecond, this generator treats the 74 random bits as a counter that grows by a random step (RFC 9562 §6.2, method 2), so a batch of 1,000 stays in strict creation order and is still unguessable.

Why there is no version 1 option

Version 1 UUIDs contain the creator’s network card address and the exact time, which turned out to be a privacy problem: in 1999, identifiers that Microsoft Office wrote into documents helped link the Melissa virus to its author. A web page can’t read your MAC address anyway, so a browser-made version 1 UUID would need a random node ID — and version 7 already does that job better, with a timestamp that sorts. The inspect mode still decodes version 1 and version 6 UUIDs you paste.

Worked example: reading the date in a UUID

RFC 9562’s example version 7 UUID is 017F22E2-79B0-7CC3-98C4-DC0C0C07398F. Its 13th digit, 7, is the version; the 17th, 9, puts it in the RFC variant. The first 12 digits, 017F22E279B0, are hexadecimal for 1,645,557,742,000 milliseconds since January 1, 1970 — 2022-02-22T19:22:22Z, which was 2:22:22 PM in New York. The RFC’s version 1 and version 6 examples hold the same moment as 138,648,505,420,000,000 intervals of 100 nanoseconds since October 15, 1582, the first day of the Gregorian calendar:

UUIDVersionCreated (UTC)
017f22e2-79b0-7cc3-98c4-dc0c0c07398fVersion 72022-02-22T19:22:22Z
c232ab00-9414-11ec-b3c8-9f6bdeced846Version 12022-02-22T19:22:22Z
1ec9414c-232a-6b00-b3c8-9f6bdeced846Version 62022-02-22T19:22:22Z

In version 1 the time is split into three pieces with the lowest bits first, so version 1 UUIDs don’t sort by time; version 6 puts the same bits in order.

How unlikely is a duplicate?

A version 4 UUID has 122 random bits, so there are 2122 — about 5.3 × 1036 — possible values. By the birthday problem, it takes about 2.7 × 1018 UUIDs before the chance of even one duplicate reaches 50%. Made at a billion per second, that is about 86 years of work. Among a billion UUIDs, the chance of any duplicate is about 1 in 1019. Real-world duplicates come from broken random number generators — an old library, or virtual machines cloned with the same random state — not from the math. This page uses crypto.getRandomValues, the browser’s cryptographically secure generator.

Formats and tips

UUIDs are generated in your browser and never sent anywhere, and the page keeps no list of them.

Frequently asked questions

What is the difference between a UUID and a GUID?

None in practice. GUID (globally unique identifier) is Microsoft’s name for the same 128-bit identifier. GUIDs made by Windows and .NET today are version 4 UUIDs; they are often written in uppercase and in braces, such as {0F8FAD5B-D9CB-469F-A165-70867728950E}.

Is a version 4 UUID really unique?

Not guaranteed, but close enough for any real system: with 122 random bits, you would need about 2.7 × 1018 of them for a 50% chance of a single duplicate. Databases still put a unique constraint on UUID keys, which costs nothing and catches the rare bug in a random number generator.

Can I use a UUID as a password or a secret token?

Better not. RFC 9562 says software should not assume UUIDs are hard to guess, a version 7 UUID has only 74 random bits plus a readable timestamp, and some libraries use weak random numbers. For secrets, use a token made for the job, such as 32 random bytes in Base64, or the password generator.

How do I check whether a string is a valid UUID?

Paste it in Inspect or validate a UUID. In code, the regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ (case-insensitive) matches UUIDs of versions 1 to 8 in the standard variant; the nil and max UUIDs need their own check.

Should I use UUIDs as database primary keys?

They work well when IDs are created in many places — several servers, offline mobile apps — or must not reveal how many records exist. Prefer version 7 for primary keys, because time-ordered values keep the index compact, and store them in a native UUID or 16-byte binary column.

Embed this calculator on your website

Free for any website or blog. Paste this code where you want the calculator to appear:

All free calculator widgets

Last updated: October 16, 2026

Menu

Categories

Finance Calculators30 calculatorsBusiness & Shopping Calculators9 calculatorsHealth & Fitness Calculators13 calculatorsMath & School Calculators23 calculatorsDate & Time Calculators19 calculatorsHoliday Countdowns17 calculatorsEveryday Tools47 calculatorsMic, Camera & Sound Tools10 calculatorsDeveloper Tools10 calculatorsImage & PDF Tools19 calculators

CalcWorthy

AboutContactPrivacy PolicyTerms of Use

Language

Language
EnglishEnglishالعربيةArabicবাংলাBanglaDeutschGermanEspañolSpanishفارسیPersianFrançaisFrenchעבריתHebrewहिन्दीHindiBahasa IndonesiaIndonesianItalianoItalian日本語Japanese한국어KoreanBahasa MelayuMalayNederlandsDutchPolskiPolishPortuguêsPortugueseРусскийRussianไทยThaiTürkçeTurkishУкраїнськаUkrainianاردوUrduTiếng ViệtVietnamese简体中文Simplified Chinese