Guide
About UUIDs
What is a UUID?
A UUID (Universally Unique Identifier), also called a GUID, is a 128-bit value written as 32 hexadecimal digits in five groups, for example 3f2504e0-4f89-41d3-9a0c-0305e82c3301. UUIDs let separate systems create identifiers independently, without a central database handing out numbers, while keeping the chance of a collision negligible.
Version 4 vs. version 1
Version 4 UUIDs contain 122 random bits. They are the default choice for database keys, request IDs and file names. You would need to generate about 2.7 quintillion of them before there is a 50% chance of a single duplicate.
Version 1 UUIDs encode a timestamp (in 100-nanosecond intervals since 1582) plus a clock sequence and node ID. Traditionally the node ID was the computer's MAC address; this tool uses a random node ID instead, so nothing about your device is revealed.
Using UUIDs in code
- JavaScript (browser and Node 19+):
crypto.randomUUID() - Python:
import uuid; uuid.uuid4() - PostgreSQL:
gen_random_uuid() - Java:
UUID.randomUUID() - Go:
uuid.New()fromgithub.com/google/uuid
Frequently asked questions
Are the UUIDs generated here truly random?
Version 4 UUIDs come from crypto.randomUUID() or crypto.getRandomValues(), the same cryptographically secure source browsers use for TLS. They are suitable for production use.
Can I use a UUID as a secret token?
A v4 UUID has 122 bits of randomness, which is enough to be unguessable, but UUIDs are often logged and displayed. For password-reset links or API keys, prefer a dedicated random token and store only its hash.
Are UUIDs case-sensitive?
No. The standard recommends lowercase output, but parsers must accept uppercase too.