What is a UUID?
Learn what UUIDs are, how versions differ (especially v4 vs v7), and how to generate identifiers locally without a server.
A UUID (Universally Unique Identifier) is a 128-bit value usually written as 36 characters with hyphens, like 550e8400-e29b-41d4-a716-446655440000. Systems use UUIDs for database keys, request IDs, and resource names when they need uniqueness without a central counter.
Versions you will meet
- Version 4 — mostly random. Ubiquitous and private about creation time.
- Version 7 — time-ordered. Improves index locality for heavy inserts, but exposes coarse timing.
- Other versions exist (time-based v1, name-based v3/v5); pick deliberately.
Read UUID v4 vs UUID v7 when you are choosing a default for a new system.
Design trade-offs
Random v4 IDs scatter across B-tree indexes, which can hurt write-heavy tables. Time-ordered IDs cluster newer rows together. Neither version is a substitute for authentication secrets: uniqueness is not confidentiality.
Generation hygiene
- Prefer platform crypto APIs over homemade randomness.
- Document which UUID version each field uses.
- Do not parse meaning out of v4 bits beyond the version/variant nibbles.
- For v7, confirm library support before standardizing.
Practice on ToolHub
Generate IDs with UUID Generator. When you need digests instead of identifiers, use Hash Generator. Both run locally in your browser.
Related topics
If you validate UUID-shaped strings in logs, What is Regex? helps you test patterns carefully. For auth identifiers carried in tokens, see What is JWT?.
Try related tools
Keep exploring
- learnWhat is Regex?Learn regular expressions—what they are good for, when parsers are safer, and how to test patterns locally without pasting sensitive data.
- learnWhat is JWT?Understand JSON Web Tokens—header, payload, signature—and how to inspect claims locally without treating decoding as verification.
- collectionDeveloper EssentialsEncoding, hashing, regex, UUIDs, JWT inspection, and other daily browser utilities for engineers.
- compareUUID v4 vs UUID v7Random UUIDs versus time-ordered UUIDs—trade-offs for databases, APIs, and uniqueness.
- compareUUID vs Random StringStandard identifiers versus custom random tokens—compare uniqueness guarantees, readability, and where each belongs.