UUID Generator
Generate UUIDs for Databases and Applications
Generate UUID v1 or UUID v4 values on demand. UUID stands for Universally Unique Identifier and is used to uniquely identify data across systems.
- UUID v1: Time-based and can reveal when it was generated.
- UUID v4: Randomly generated and the default choice for most applications.
Need modern sortable IDs instead of legacy v1 ordering? Use the UUID v7 Generator. Need to inspect an existing ID first or compare it with ULIDs? Use UUID Inspector and ULID Generator.
Example format (36 characters with hyphens):
f47ac10b-58cc-4372-a567-0e02b2c3d479- Primary keys in databases.
- Public IDs in APIs and URLs.
- Correlation IDs for logs and tracing.
- Identifiers for files, sessions, or events.
UUIDs are 128-bit identifiers with a very large address space. Collisions are considered practically negligible for typical application use.
Use the uuid npm package and call uuidv4().
import { v4 as uuidv4 } from 'uuid';
uuidv4(); // returns new UUIDUse the Guid.NewGuid(); Method.
Guid myUUID = Guid.NewGuid();
Console.WriteLine(myUUID);Import the uuid library and call uuid.uuid4().
import uuid
uuid.uuid4()See the Python 2 docs and Python 3 docs for more information.
Use the Generate GUID Online Tool for GUID terminology.
Are UUIDs secure secrets? No. UUIDs identify records; they do not encrypt data.
Which UUID version should I use? Use v4 for random IDs, UUID v7 for modern sortable IDs, and v1 only when a legacy system still expects it.
Can UUIDs collide? Collisions are practically negligible for most applications.