Version 5 UUID Generator

Deterministic: SHA-1 hash of a namespace + name. Prefer over v3.

The name is hashed as UTF-8, so non-ASCII text (é, 日本語, emoji) matches Python, Java, Go and .NET. The same namespace + name always gives the same UUID.

Decode
Options & format

Formatting is applied instantly in your browser. A GUID is a UUID: tick Uppercase + Braces for the Microsoft registry style.

API
https://uuidtools.com/api/generate/v5?namespace=ns:dns&name=base64:ZXhhbXBsZS5jb20

Plain-text and JSON API docs: no key required.

About Version 5 UUIDs

A version 5 UUID is the SHA-1 hash of a namespace UUID and a name, truncated to 128 bits with the version and variant bits set. Like v3 it is deterministic: the same inputs always produce the same UUID.

Names are hashed as UTF-8 bytes, matching Python's uuid.uuid5, Java's libraries and most RFC 9562 implementations.

Structure

sha1(namespace + name)[0..16] with version = 5 and variant = 10

When to use it

  • Deriving stable IDs from URLs, domains or natural keys (idempotent imports, content addressing, deduplication).

When to avoid it

  • Anywhere unpredictability is required: anyone who knows the name can compute the UUID.

Frequently asked questions

Is v5 better than v3?

Yes, SHA-1 is stronger than MD5 and RFC 9562 prefers it. Both are fine for identifiers, neither is suitable for security purposes.

How do I generate the same UUID in code?

Python: uuid.uuid5(uuid.NAMESPACE_DNS, "example.com"). PHP: Uuid::uuid5(Uuid::NAMESPACE_DNS, "example.com"). Java: Generate with a library such as java-uuid-generator.