If you need an ID that is easy to generate, unlikely to collide, and safe to create on the client, UUID v4 is a common choice.
Start here:
- Open the UUID Generator.
- Choose how many IDs you need.
- Copy the result.
What a UUID is
UUID stands for Universally Unique Identifier.
A UUID is a 128-bit identifier usually written as 32 hex characters with hyphens:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
UUID v4 is the "random" version. It is generated from random bytes with a couple of fixed bits.
When UUID v4 is a good fit
Use UUID v4 for:
- database primary keys when you do not want a central ID generator
- request or trace correlation IDs
- filenames or object keys when uniqueness matters
UUID v4 is especially useful in distributed systems because you can generate IDs independently.
When UUID v4 is not a good fit
Avoid UUID v4 when:
- you need sortable IDs by creation time (UUID v4 is random)
- you need short, human-friendly IDs
- you are using the ID as a secret
A UUID is an identifier, not a password.
If you need a secret token, use the Password Generator.
Quick start: generate a UUID v4
- Open the UUID Generator.
- Set Number of UUIDs.
- Copy.
Textavia uses cryptographically secure randomness in your browser.
Examples
Example 1 (beginner): generate one ID for a spreadsheet
If you need a unique row key:
- generate 1 UUID
- paste it into the row
Example 2 (professional): correlation ID for logs
If you want to trace a request across services:
- generate a UUID
- attach it to logs and headers
Example 3 (professional): client-side temporary IDs
When you create items offline and sync later:
- create a UUID per item
- keep it stable through sync
Common mistakes
Treating UUIDs as secrets
UUIDs are not designed to be unguessable secrets.
If an attacker can see one UUID, it does not automatically expose others, but you should not use UUIDs as API keys.
Assuming "unique" means "impossible to collide"
UUID v4 collisions are extremely unlikely, but not mathematically impossible.
In normal software, it is safe to treat UUID v4 as unique.
Using UUIDs when you need ordering
If you need IDs that sort by time, use a time-ordered scheme (or store a timestamp separately).
If you only do 3 things
- Use UUID v4 for identifiers, not secrets.
- Store timestamps separately if you need ordering.
- Generate IDs with a cryptographically secure RNG.
Sources and further reading
- RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace
Related tools
- Generate secret strings with the Password Generator.
- Create readable slugs with slugify.
Privacy and security
Textavia's UUID generator runs locally in your browser. Your generated IDs are not uploaded to a server.
