UUID Generator

UUID / GUID Generator

Generate v4 UUIDs, NanoIDs, short IDs or custom-prefixed unique identifiers -- up to 50 at once.

Advertisement

Generated IDs
Click Generate...
⚠️

Disclaimer: This tool runs entirely in your browser -- nothing you enter is sent to or stored on our servers.

What a UUID Is, and Why Version 4 Is Standard

A UUID (Universally Unique Identifier) is a 128-bit identifier standardized as a 32-character hexadecimal string in the format 8-4-4-4-12 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). UUID version 4 (the most common, and what this generator produces) is randomly generated. The probability of generating two identical UUIDs is astronomically small -- approximately 1 in 5.3 x 1036, making collisions a non-issue in virtually any real-world system.

Common use cases: primary keys in databases (avoids sequential-ID guessing attacks and lets distributed systems generate IDs independently without central coordination); session tokens; file names for user-uploaded content to prevent overwriting; API correlation IDs for request tracing in microservices; and unique event identifiers in analytics systems. For security-critical tokens like password reset links, use a cryptographically secure random generator and consider shorter, URL-safe token formats rather than full UUIDs.

Worked Example

Generating 5 UUID v4 identifiers produces output like 3f2a9c1e-7b4d-4a6f-9e2c-8d1b5f0a3c7e -- each one independently random, each starting its third group with "4" (marking it as version 4) and its fourth group with 8/9/a/b (the RFC 4122 variant bits), which is how a UUID's version can be identified just by inspection.

Frequently Asked Questions

They're generated using JavaScript's Math.random(), which is suitable for non-security-critical uses like database keys, file names, or tracking IDs -- but Math.random() is not cryptographically secure. For security-critical tokens (session IDs, password reset tokens, API keys), use the Web Crypto API's crypto.getRandomValues() or a server-side cryptographically secure generator instead.
A standard UUID v4 is always 36 characters (32 hex digits plus 4 hyphens) and encodes its version/variant in specific positions. A NanoID is typically shorter (21 characters by default, as generated here) and uses a larger alphabet (letters, numbers, hyphen, underscore), making it more compact for cases like URL slugs where a full UUID would be unnecessarily long.
Yes -- use the optional prefix field to prepend a string like 'user_' or 'order_' to every generated identifier, which is a common pattern (popularized by Stripe's API) for making IDs self-describing at a glance, e.g. 'user_3f2a9c1e...' clearly signals what kind of entity the ID refers to.
Advertisement