UUID Generator

Generate UUIDs in versions 4, 5 and 7

Version 4 — Random

Fully random — generated from a cryptographically secure RNG. No input required. Best choice for general-purpose unique identifiers.


Version 5 — Name-based (SHA-1)

Deterministic — derived from a namespace UUID and a name via SHA-1. The same inputs always produce the same UUID, making it ideal for stable, reproducible identifiers.

Same name + namespace always produces the same UUID.


Version 7 — Time-ordered

Time-sortable — embeds a Unix millisecond timestamp in the most significant bits. UUIDs generated later sort after earlier ones, making them great for database primary keys.

UUID v7 embeds a Unix timestamp, making it naturally sortable.

This was useful for you? Do you have a suggestion? Please, consider submit a PR on this project on GitHub