A UUID (Universally Unique Identifier), also called a GUID, is a 128-bit value that looks like f47ac10b-58cc-4372-a567-0e02b2c3d479. The point is that you can generate one anywhere, anytime, and be confident it will never collide with another. Here is when that is useful.
Why not just use 1, 2, 3?
Sequential numbers need a central authority (usually a database) to hand them out in order. UUIDs do not. That matters when:
- You generate IDs on the client or across multiple servers before anything reaches the database.
- You merge data from different systems and need to avoid clashes.
- You do not want IDs to reveal how many records exist or to be guessable.
v4 is the one you usually want
UUID version 4 is random. It is the common default because it needs no coordination and no input, just randomness. Other versions exist (v1 is time-based, v7 is time-ordered and newer), but v4 covers most needs.
Generate one in your browser
- Open the UUID Generator.
- Generate one or many at once using your browser’s secure random source.
- Copy them.
Nothing is sent to a server.
A note on databases
UUIDs are great for uniqueness but are larger than integers and random v4 values can fragment database indexes. If you store huge volumes and care about index performance, look at time-ordered UUIDs (v7) or keep a separate integer primary key. For most apps, v4 is perfectly fine.
Related tools
- Need a short random token instead? Use the Password Generator.
- Hashing a value to a fixed ID? Try the Hash Generator.
- Building WordPress transient keys? See the Transient Key Generator.
When you need a unique ID without asking a database first, generate a v4 UUID and move on.