UUID / GUID Generator
Generate v4 UUIDs, NanoIDs, short IDs or custom-prefixed unique identifiers -- up to 50 at once.
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.
Second Worked Example: Choosing a Format
The first three formats share the same 36-character v4 pattern, while the last two are shorter random strings, so you can pick the one your system expects. With the prefix user_ and a count of 3, the five choices produce output like this (values differ every click):
- UUID v4:
user_9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d, 36 characters plus your prefix. - UUID UPPERCASE: the same pattern in capitals,
9B1DEB4D-3B7D-4BAD-9BDD-2B0D7B3DCB6D. - No hyphens: 32 hex characters in one block, handy for filenames and some database columns.
- Short ID: about 16 letters and digits from base-36 random numbers, for friendly codes.
- NanoID: 21 characters drawn from letters, digits, hyphen and underscore, which is URL-safe.
You can generate up to 50 at once. Leave the count blank and the tool falls back to 5, and any number above 50 is capped at 50.
Common Mistakes
- Using these as secrets. The generator relies on the browser’s ordinary random function, which is fine for database keys and test data but not for password-reset links, API keys or session tokens.
- Expecting the prefix to be counted in the length. The prefix is added in front, so a 21-character NanoID with
prod_becomes 26 characters. Check column limits first. - Treating the short ID as globally unique. It has far fewer random characters than a UUID, so use it for display codes in small datasets, not as the only identifier in a large system.
- Mixing cases in comparisons. UUIDs are case-insensitive hex, but string comparison in many databases is not. Store them consistently, either all lowercase or all uppercase.
- Removing hyphens by hand. Use the “no hyphens” option instead, so the version and variant digits stay in the right positions.
Where You Would Use This
- Creating primary keys for seed data or fixtures in a development database.
- Producing unique file names for uploaded images so they never overwrite each other.
- Making prefixed identifiers such as
order_orinv_for an API design. - Generating correlation IDs to tag requests while you trace a bug across services.