UUID Namespace

UUID v5 DNS Namespace

The DNS namespace is the standard namespace for deriving identifiers from fully-qualified domain names — the most common choice for name-based UUIDs.

Well-known RFC namespace6ba7b810…Deterministic (SHA-1)

Generated locally with the Web Crypto API — nothing leaves your browser.

What Is UUID v5 DNS Namespace?

How to generate

  1. Select version v5 in the generator.
  2. Set the namespace to dns.
  3. Enter a domain name, e.g. example.com, then generate.

Use Cases

Code Examples

Python
import uuid
uid = uuid.uuid5(uuid.NAMESPACE_DNS, 'example.com')
JavaScript
import { v5 as uuidv5 } from 'uuid';
const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
const id = uuidv5('example.com', DNS);
SQL
SELECT uuid_generate_v5('6ba7b810-9dad-11d1-80b4-00c04fd430c8', 'example.com');

Frequently Asked Questions

Is v5 reversible?
No. It is a one-way SHA-1 hash, so you cannot recover the domain name from the UUID.
Why not use v4 for the same domain?
v4 is random — the same domain would produce a different identifier each run, breaking idempotency.
Does DNS need to resolve?
No. The name is hashed as a string; no lookup occurs.

Related tools