UUID Generator

Click to generate cryptographically random v4 UUIDs (GUIDs). Bulk generation, uppercase option, one-click copy — Web Crypto API, nothing sent anywhere.

1ee39f108-9583-4d09-bbbb-f1df353d95be
2432ac882-6126-4457-9374-1b4590d68eec
3c1712066-e063-4426-ab93-2818a220a5f9
488d945da-8e23-4a65-82c1-0cfc74f86076
5043a67d3-deea-4a4d-b5b2-89038904e949

What Is a UUID (Universally Unique Identifier)?

A UUID is a 128-bit number used to uniquely identify information in computer systems. The standard format is 32 hexadecimal digits displayed as five groups separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

UUIDs were standardized by the Open Software Foundation (OSF) and defined in RFC 4122. They are designed so that anyone can create a UUID with reasonable confidence that it will never collide with another UUID created by anyone else, anywhere in the world, without needing a central registration authority.

UUID Versions Explained

There are several UUID versions, each with a different generation method. Version 1 uses the current timestamp and the machine's MAC address. Version 3 generates a UUID by hashing a namespace and name using MD5. Version 4 (what this tool generates) uses cryptographically random numbers. Version 5 is like v3 but uses SHA-1 hashing.

Version 4 is by far the most commonly used because it's simple, requires no system-specific information, and produces UUIDs with excellent uniqueness properties. The 122 random bits provide 5.3 × 10^36 possible values.

How to Use UUIDs in Your Projects

In databases, UUIDs work well as primary keys. PostgreSQL has a native UUID type; MySQL can store them as CHAR(36) or BINARY(16). In JavaScript, use crypto.randomUUID() (built into all modern browsers and Node.js 19+). In Python, use uuid.uuid4() from the uuid module. In Java, use java.util.UUID.randomUUID().

When using UUIDs as database keys, consider using UUID v7 (time-ordered) for better index performance if your database supports it, as random v4 UUIDs can cause B-tree index fragmentation in some databases.

UUID Format and Structure

A UUID string has the format 8-4-4-4-12 (hex digits per group). In a v4 UUID, the 13th character is always '4' (indicating version 4), and the 17th character is one of '8', '9', 'a', or 'b' (indicating the variant). All other positions are random hex digits.

UUIDs are case-insensitive according to the specification. While lowercase is the most common convention, uppercase is equally valid. This tool generates lowercase UUIDs by default with an option to switch to uppercase.

Frequently Asked Questions

Related Tools

Recently Used Developer Tools

Explore More Tools

Find this tool useful? Buy us a coffee to keep DuskTools free and ad-light.