“Your database needs primary keys” or “you want unique request IDs for your API” - these are moments when UUIDs help.
In this article, we explain how to generate UUIDs: what they are, how version 4 works, where to use them, and how to generate them in bulk in your browser.
What is a UUID?
A UUID (Universally Unique Identifier) is an identifier practically guaranteed to be unique worldwide. It is written as 32 hexadecimal digits with hyphens.
550e8400-e29b-41d4-a716-446655440000
- 32 hexadecimal digits (0-9 and a-f)
- Hyphenated 8-4-4-4-12 form
- Treated as a 128-bit number
Key point: UUIDs need no central authority, so they work offline and across distributed systems without worrying about collisions.
UUID versions
The main versions:
| Version | Method | Notes |
|---|---|---|
| v4 | Random | The most common. Negligible collision probability |
| v1 | Time + MAC address | Sortable, but includes the MAC address |
| v7 | Time + random | Newer; combines sortability and randomness |
Most systems use v4 (random-based).
Collision probability of v4
v4 uses about 122 bits of randomness. The chance of accidentally generating the same value twice is practically zero - even if you generated UUIDs for longer than the age of the universe. In practice, collisions are not a concern.
Where UUIDs are used
- Database primary keys: instead of auto-incremented IDs
- API request IDs: tracing requests during debugging
- Unique file names: auto-generating collision-free names
- Session and token identifiers: temporary identifiers
Caution: A UUID is an identifier, not an encryption key or authentication secret. For high-security requirements, use dedicated random generation.
How to generate UUIDs
The Tools Hub UUID generator creates as many as you need, right in your browser.
Set the count
Choose how many UUIDs you need (up to 1000).
Generate
Press the button and random UUIDs appear as a list.
Copy or download
Copy them one by one or download them all at once.
The tool introduced in this article
UUID Generator
Generates version 4 UUIDs in bulk (up to 1000). All in your browser with no uploads.
Notes when using UUIDs
- Case: upper and lower case are treated the same, but pick one and stay consistent when storing
- Hyphens: some systems store the 32-digit compact form without hyphens
- Version choice: v4 is enough unless you need time ordering - then consider v7
Summary
- A UUID is a globally unique 128-bit identifier (32 hex digits)
- v4 (random) is the most common, with practically zero collision probability
- Use it for primary keys, request IDs, file names and more
- It is an identifier, not a cryptographic key
- The Tools Hub generator works entirely in your browser
Next time you need unique IDs, use the steps above or the Tools Hub UUID generator.
FAQ
What is a UUID?
Universally Unique Identifier: a 128-bit identifier practically guaranteed to be unique worldwide, written as 32 hexadecimal digits.
What is the collision probability of UUID v4?
It uses about 122 bits of randomness, so collisions are practically impossible - generating UUIDs for longer than the age of the universe would still make a duplicate almost inconceivable.
Are upper and lower case treated the same?
Yes, they represent the same UUID. However, some systems define a storage format, so follow their convention.
How many can I generate at once?
Up to 1000 at a time, with copy and download support.