🔗 bech32-label Demo
Convert 32-byte public keys ↔ DNS-safe bech32 labels for per-identity subdomains
Example Values
Click to load example values:
Perfect for DNS subdomains:
user-id.yourapp.com
Usage Example:
const userSubdomain = `https://${label}.myapp.com`;
// → Complete origin isolation per user
// → Prevents cross-tenant XSS/CSRF attacks
// → 52 chars fits DNS label limit (63 max)
Why bech32-label?
- 64-char hex exceeds DNS label limit (63 chars)
- npub encodings have HRP/checksum for display, not normative IDs
- 52-char labels fit perfectly in DNS with room to spare
- Zero dependencies, deterministic, canonical