How the Seeded Generator Works – From Seed to UUIDv5
At first glance, generating a deterministic UUID from a string might seem magical. In reality it follows a precise, standards-based process that anyone can verify and reproduce.
The tool takes your seed—whether it is user-42, invoice-2025-001, or any free text—and passes it through the battle-tested SHA-256 cryptographic hash function built into every modern browser. This produces a 256-bit value that is unique to that exact input.
From Hash to UUID
Only the first 128 bits of the hash are needed for a UUID. These 16 bytes are then adjusted in two specific positions to comply with RFC 4122:
First, the version field is set to 5, indicating a name-based UUID using SHA-1 (even though we use stronger SHA-256, the version number remains 5 for compatibility). Second, the variant field is set to the RFC 4122 variant, ensuring every other UUID library recognizes the result as valid.
Why SHA-256 Instead of SHA-1
The original UUIDv5 specification uses SHA-1, but SHA-1 is now considered cryptographically weak. By using SHA-256 and simply truncating, we gain far greater collision resistance while keeping perfect compatibility with existing UUID parsers and databases.
Determinism Guaranteed
Because SHA-256 is a pure mathematical function with no hidden state or randomness, the same input string will always produce the exact same 256-bit hash on every device and in every browser forever. Truncating and applying the version/variant bits is also deterministic. The final UUID is therefore 100% reproducible.
FAQ
Is this real UUIDv5?
Functionally identical. Only difference is stronger hash algorithm; all parsers accept it as valid version 5.
Can I feed the output directly into PostgreSQL UUID type?
Yes. PostgreSQL, MySQL, MongoDB, and every major database accept it without issue.
What if two different seeds produce the same UUID?
With 128-bit output the probability is lower than one in ten billion for reasonable data volumes.
Understanding the pipeline removes any mystery—you now have full confidence that your seeded UUIDs are stable, standards-compliant, and safe.