Tools

UUID Generator

Generate UUID v1, v4, and v7 in any quantity.

About UUID

UUID (Universally Unique Identifier) is a 128-bit unique identifier that allows collision-free ID generation in distributed systems without a central server. Format: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx (M = version, N = variant bits) Common uses: • Database primary keys • Session and token IDs • Unique identifiers in distributed systems • File and resource naming

UUID Version Comparison

VersionBased OnSortableUse Case
UUID V1Timestamp + MACYesDistributed systems, log tracing
UUID V4RandomNoGeneral purpose, session IDs
UUID V7Unix TimestampYesModern DBs, time-ordered inserts

UUID Examples

v1 (timestamp): 6ba7b810-9dad-11d1-80b4-00c04fd430c8 v4 (random): 550e8400-e29b-41d4-a716-446655440000 v7 (Unix TS): 018faded-dead-7000-8000-000000000000

FAQ

Should I use UUID v4 or v7?
For general purposes (session IDs, tokens), v4 is the most widely supported. For database primary keys where time-ordering matters, v7 is recommended — its timestamp prefix improves B-tree index performance compared to random v4.
Can UUIDs collide?
UUID v4 has 122 bits of random entropy. Even generating 1 billion per second, the probability of a collision after 100 years is only about 50%. In practice, collisions are essentially impossible.
Is UUID suitable as a database primary key?
v4 is fully random, causing frequent B-tree page splits. Time-sortable IDs like v7 or ULID are better for database performance. Store as BINARY(16) in MySQL to save space versus VARCHAR(36).
Does UUID v1 expose the MAC address?
The original v1 spec includes the real MAC address. However, this tool uses random node values, so no MAC address is exposed. For security-sensitive use cases, prefer v4 or v7.

Related Tools