Try it Live
Run ENS examples in the interactive playground
ENS Encoding
Cryptographic operations for ENS names implementing EIP-137 name hashing.Functions
namehash(name)
Compute ENS namehash for a given name. Algorithm:namehash(name) = keccak256(namehash(parent) ‖ labelhash(label))
Empty string has hash of 32 zero bytes.
- Functional API
- Factory API
labelhash(label)
Compute ENS labelhash for a single label. Algorithm:labelhash(label) = keccak256(label)
- Functional API
- Factory API
Algorithm Details
Namehash Recursion
Bundle Size
Factory pattern enables tree-shaking:- Functional API: ~15KB (includes keccak256)
- Factory API with custom crypto: Depends on your keccak256 implementation
See Also
- ENS Overview
- ENS Normalization
- EIP-137 - ENS name hash specification

