Live · UUID v4

UUID Generator

A cryptographically random identifier — generated fresh, just for this visit.

Your UUID
Version 4 Bits 122 random Generated 1 total
Advertisement

Frequently Asked Questions

Everything you need to know about UUIDs and this generator.

What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information across systems without needing a central authority. It's typically displayed as 36 characters — 32 hexadecimal digits separated into five groups by hyphens, like 550e8400-e29b-41d4-a716-446655440000. UUIDs are also called GUIDs (Globally Unique Identifiers) in the Microsoft ecosystem.
What is UUID v4?
UUID version 4 is generated using random or pseudo-random numbers. Of the 128 bits, 6 are reserved (4 for the version, 2 for the variant), leaving 122 bits of randomness — that's roughly 5.3 × 10³⁶ possible values. It's the most commonly used UUID version because it doesn't require any input like a MAC address (v1) or a name (v3/v5).
Are these UUIDs really unique?
Practically yes. With 122 bits of entropy from a cryptographically secure random source, you would need to generate billions of UUIDs per second for many decades to have even a 1% chance of collision. For all real-world purposes, you can treat each UUID as unique.
Is this generator secure? What random source does it use?
This generator uses crypto.randomUUID(), a built-in browser API backed by your operating system's cryptographically secure random number generator (CSPRNG). The output is RFC 4122 compliant and suitable for security-sensitive applications like session tokens or API keys (though for those, also consider longer tokens).
Do you store or log the UUIDs I generate?
No. Generation happens entirely in your browser. Nothing is ever sent to a server — you can verify this by opening DevTools → Network, or by disconnecting from the internet. The UUIDs are yours alone.
What's the difference between UUID v4 and UUID v7?
UUID v4 is fully random. UUID v7 (a newer, 2024-standardized version) embeds a Unix millisecond timestamp into the leading bits, making the UUIDs sortable by creation time. v7 is excellent for database primary keys because it preserves index locality. v4 is the right choice when you need unpredictability or don't care about ordering.
Why use a UUID instead of an auto-incrementing integer ID?
UUIDs let multiple services or devices generate IDs independently without coordination — no central database, no collisions. They also don't leak business information (e.g., "we have 47 users"). The tradeoff: they're larger (16 bytes vs. 4–8) and, for v4, hurt index locality compared to integers.
Can I bookmark this page or use it offline?
Yes. The page works without an internet connection once loaded. You can bookmark it, save it to your home screen, or even download the HTML file and open it locally — generation will still work.
Advertisement

Generate UUIDs in Your Code

If you need UUIDs at scale, use your language's standard library — no dependencies, no network.

JavaScript
// Browser & Node.js 19+
const id = crypto.randomUUID();
// "550e8400-e29b-41d4-a716-446655440000"
Python
import uuid
id = str(uuid.uuid4())
# '550e8400-e29b-41d4-a716-446655440000'
Java
import java.util.UUID;
String id = UUID.randomUUID().toString();
Go
import "github.com/google/uuid"
id := uuid.NewString()
Ruby
require 'securerandom'
id = SecureRandom.uuid
PHP
// PHP 7+ with ramsey/uuid
use Ramsey\Uuid\Uuid;
$id = Uuid::uuid4()->toString();
PostgreSQL
-- requires pgcrypto extension
SELECT gen_random_uuid();
Bash / shell
uuidgen
# or on Linux:
cat /proc/sys/kernel/random/uuid
Copied to clipboard