If you work with databases, APIs, or have just seen a long string like 550e8400-e29b-41d4-a716-446655440000 in code, you've come across a UUID. Let's explain in plain terms what it is and why it's used.
What is a UUID
A UUID (Universally Unique Identifier, also called a GUID) is a 128-bit identifier written as 32 hexadecimal characters split by hyphens into five groups: 8-4-4-4-12. For example:
550e8400-e29b-41d4-a716-446655440000
The core idea: a UUID can be generated anywhere — on different servers, devices, or even offline — while practically guaranteeing that you'll never get two identical ones. The odds of a collision are so tiny they're considered negligible.
Why it's needed
Database records are usually numbered sequentially: 1, 2, 3... But that approach has problems:
- Distributed systems. If data is created on several servers at once, sequential numbers start to collide. Each node generates its own UUID independently, so there are no conflicts.
- Obscurity. A URL like
/user/1,/user/2reveals how many users you have and lets someone enumerate other people's records. A UUID can't be guessed. - Client-side generation. An app can assign an object an ID before it's even sent to the server.