Hash Checksum Calculator

A hash checksum reduces a piece of text to a single fixed-size number, so that the same input always produces the same value and even a small change to the input usually changes the output. Checksums of this kind are used to index data in hash tables, to detect accidental changes, and as quick fingerprints of strings. This calculator computes the well-known djb2 hash, a simple non-cryptographic hash by Daniel J. Bernstein that is prized for being fast and well spread across its range. It starts from the seed value 5381 and, for each character in the text, updates the running hash by multiplying it by 33 and adding the character code, keeping the result within a 32-bit unsigned range. You enter any text and the calculator returns the resulting hash as both a decimal number and a hexadecimal value, the two forms in which checksums are usually written. Because the algorithm is fully specified, the result is deterministic: the same text always gives the same hash on any correct implementation. This is a checksum for indexing and integrity checking, not a cryptographic hash, so it is not suitable for passwords or security. The algorithm and a worked example that reconciles to the calculator default are shown in full below.

The djb2 hash starts at 5381 and, for each character, sets hash = hash x 33 + code (mod 2^32). For the default text abc, the djb2 hash is 193485963 in decimal, or b885c8b in hexadecimal.

Source: US National Institute of Standards and Technology (NIST). As at 25 June 2026.

Any characters
Length (characters)--
djb2 hash (decimal)--
djb2 hash (hexadecimal)--

Formula

hash = 5381
for each character c: hash = (hash x 33 + code(c)) mod 2^32
The final hash is the checksum (shown in decimal and hex)

Starting from the seed 5381, the hash is updated once per character by multiplying by 33 and adding the character code, then reduced to a 32-bit unsigned value. The final number is the checksum.

Worked example

Compute the djb2 hash of the text abc.

  1. Start: hash = 5381
  2. After 'a' (97): 5381 x 33 + 97 = 177670
  3. After 'b' (98): 177670 x 33 + 98 = 5863208
  4. After 'c' (99): 5863208 x 33 + 99 = 193485963, hex b885c8b

This is the calculator's default text, so the hash 193485963 (b885c8b) matches the widget exactly.

Hash Checksum Calculator: frequently asked questions

What is the djb2 hash?

The djb2 hash is a simple, fast non-cryptographic hash function by Daniel J. Bernstein. It starts from 5381 and, for each character, multiplies the running hash by 33 and adds the character code.

Why start at 5381 and multiply by 33?

These specific constants were found to spread typical inputs well across the output range, giving few collisions for ordinary text. They are part of the standard definition of the algorithm.

Is this suitable for passwords?

No. djb2 is a checksum for indexing and integrity checks, not a cryptographic hash. Never use it to store passwords or for security-sensitive purposes.

Why is the result shown in hexadecimal too?

Checksums are commonly written in hexadecimal because it is compact and maps neatly onto the bytes of the value. The decimal form is shown alongside for convenience.

Is the result reproducible?

Yes. The algorithm is fully specified, so the same text produces the same hash on any correct implementation, every time.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.