A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify records, files, sessions, or anything else in a distributed system. This guide explains how they work and how to generate one.
1. What is a UUID?
A UUID is a 36-character string like 550e8400-e29b-41d4-a716-446655440000. It's designed to be unique without coordination between computers — you can generate a UUID on your laptop and another on a server on another continent, and they will almost certainly be different.
2. UUID versions
- Version 1 — based on timestamp and MAC address. Sortable but leaks info.
- Version 4 — fully random. Most common. Used by default in most systems.
- Version 5 — deterministic, generated from a name and namespace.
- Version 7 — new (2024), timestamp-based and sortable like v1, with random bits for uniqueness.
3. When to use UUIDs
- Database primary keys when you don't want sequential IDs leaking business info
- API request IDs for tracing requests in logs
- File names in blob storage to avoid collisions
- Session tokens (with cryptographic randomness, not just any UUID)
4. How to generate one
Open the UUID v4 Generator and click Generate. The tool produces a random RFC 4122-compliant UUID instantly. You can generate as many as you need — ideal for seeding test databases.