A UUID (Universally Unique Identifier) is a 128-bit identifier commonly displayed as a 36-character string (8-4-4-4-12). UUID v4 uses cryptographically-strong random values for most bits and is ideal when you need decentralized, collision-resistant IDs without a central server.
How to use the UUID Generator
- Open the generator page (UUID Generator).
- Choose how many UUIDs you want to generate (you can generate multiple at once).
- Click Generate to create RFC-4122 UUID v4 values using your browser's
cryptoAPI. - Use Copy to copy the list to clipboard or Download to save them as a text file.
Examples
Single UUID (v4)
f47ac10b-58cc-4372-a567-0e02b2c3d479
Multiple UUIDs (sample)
d9b1c36e-9d3b-4a11-9b2f-2a9f1d1e8c3c
9f8b6d2c-4a72-4c1a-8f3e-1b2a3c4d5e6f
2a4b6c8d-7e9f-4a01-b2c3-9d8e7f6a5b4c
Best practices
- Use UUID v4 for decentralised ID generation: Generate IDs client-side or in microservices without coordination.
- Store as binary when possible: In databases, store UUID as a 16-byte binary to save space and improve indexing.
- Prefer canonical lowercase: Use the standard lowercase, hyphenated representation
(
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). - Don't rely on UUIDs as secrets: UUID v4 is random but not intended for authentication tokens; use secure secrets for that.
- Validate input: When accepting UUIDs from users or APIs, validate format and version (version 4) to avoid malformed data.
Common pitfalls
- Assuming UUIDs are cryptographically unguessable — they're random but not a substitute for secrets.
- Using string UUIDs in high-write DB indexes without considering UUID ordering (random v4 can fragment B-tree indexes).
- Double-encoding or altering hyphens when storing/retrieving across systems.
- Generating UUIDs with non-cryptographic RNGs (use
crypto.getRandomValuesin browsers or secure RNG on servers).
FAQ
Does the tool upload my data?
No. UUIDs are generated locally in your browser using the Web Crypto API; nothing is sent to the server.
What's the difference between UUID v1 and v4?
v1 embeds timestamp and node (MAC) information — it can leak timing/location details. v4 is random and preferred when privacy and decentralization matter.
Should I use UUIDs as database primary keys?
Yes, in many distributed systems. But consider index performance: use UUIDv4 with strategies like UUIDv6/ULID or ordered UUIDs if sequential-ish insertion helps DB performance.
Try the tool: UUID v4 Generator