UUID Generator

Generate cryptographically random v4 UUIDs (GUIDs) using the Web Crypto API. Bulk generation, uppercase option, one-click copy. Runs entirely in your browser.

1f942a0d7-0b22-4746-bac3-bcf0cc17c241
265c6b5cd-ddcf-4445-89f1-f2d2471272a9
389c95423-07fa-4e0f-8665-a9300f2d7001
450b76b17-5edf-4c93-9c9c-e5942ffe8331
5ac018770-1b54-4015-bce4-bf07918239bf

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

Explore More Tools

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