UUID Namespace
UUID v5 URL Namespace
The URL namespace is the right choice when the thing you are identifying is a web address rather than a bare hostname.
Well-known RFC namespace6ba7b811…Deterministic (SHA-1)
Generated locally with the Web Crypto API — nothing leaves your browser.
What Is UUID v5 URL Namespace?
- The URL namespace has the identifier
6ba7b811-9dad-11d1-80b4-00c04fd430c8. It is separate from the DNS namespace so thathttps://example.com/aand the bare hostexample.comproduce different UUIDs. - Use it when the identity you care about includes scheme, path or query — a canonical page URL, an API endpoint, or an asset address.
How to generate
- Select version v5 and the url namespace.
- Paste the full URL, including the scheme.
- Generate — the same URL always produces the same UUID.
Use Cases
- Crawl or cache keys for a URL that must map to one identifier.
- Canonical page identity across an index rebuild.
- Deduplicating bookmarks or feed entries.
Code Examples
Python
import uuid
uid = uuid.uuid5(uuid.NAMESPACE_URL, 'https://example.com/page')JavaScript
import { v5 as uuidv5 } from 'uuid';
const id = uuidv5('https://example.com/page', '6ba7b811-9dad-11d1-80b4-00c04fd430c8');Frequently Asked Questions
Should I normalise the URL first?
Yes. Lowercase the host, drop the fragment, and decide deliberately whether to keep query parameters and a trailing slash — otherwise the same page can hash two ways.
Does the namespace affect the result?
Yes. Identical names under the URL and DNS namespaces give different UUIDs; that separation is the point.