SDBM Hash Generator
Compute the classic SDBM database-style non-cryptographic hash.
Reproduce the SDBM shift-and-subtract recurrence
The SDBM hash updates state with the next byte plus the previous state shifted by six and sixteen bits, minus the previous state. That expression is equivalent to multiplying by 65599 before adding the byte. This tool uses UTF-8 input and wraps each update to unsigned 32 bits, reproducing a common historical database hash convention.
For hello, the resulting hexadecimal value is 28d19932. The recurrence is sensitive to byte order, so anagrams generally differ even if they contain the same characters. A language that iterates Unicode code units instead of UTF-8 bytes can disagree on non-ASCII text; identical source bytes are required for meaningful cross-system comparison.
Expect collisions in a fixed 32-bit space
SDBM is a fast lookup hash, not a checksum standard or cryptographic primitive. Deliberate collisions are feasible and 32-bit accidental collisions become likely at scale. The calculation runs in your browser. Use this page for compatibility and experiments, not passwords, signed content, secure deduplication, or any decision where a malicious party controls input.
Frequently Asked Questions
What multiplier is hidden in the SDBM formula?
The shift expression is equivalent to multiplying the previous state by 65599 and adding the next byte.
Why might Unicode text differ across tools?
Some implementations hash UTF-16 code units; this page explicitly hashes UTF-8 bytes.
Can SDBM prove data integrity?
No. It is an unkeyed 32-bit distribution function with no adversarial guarantees.
Browse the full set of free, private, in-browser tools.