snefru hash generator online

Create the snefru hash of any text: 64 hex characters, the same result as PHP's hash(). Check a hash or a file below. Nothing leaves your browser.

Runs in your browser
A hash is one-way. It can't be turned back into the text.
Check & convert

Compare, hash a file, copy any format

Type text in the tool above or choose a file. Case, spaces and prefixes like snefru: don't matter.

Formats for hello world
Hex
902b49fa8b0828b44d8ac069111899bbfaf51d334485e4b28e90c93f63bb86dd
HEX (upper case)
902B49FA8B0828B44D8AC069111899BBFAF51D334485E4B28E90C93F63BB86DD
Base64
kCtJ+osIKLRNisBpERiZu/r1HTNEheSyjpDJP2O7ht0=

Files are read in your browser and never uploaded.

In short

What is Snefru?

Snefru is a hash function by Ralph Merkle from 1990, here in its 256-bit form. Biham and Shamir broke it with differential cryptanalysis. In PHP, "snefru" and "snefru256" are two names for the same algorithm and give the same result.

BrokenCollisions can be produced on purpose. Don't use it where an attacker could profit.
Try it

Change one letter, see what happens

A cryptographic hash changes about half of all bits when one input character changes. Nothing about the old hash tells you what the new one will be.

Hash A…
Hash B…

Calculating…

Use it in code

The same result in your code

Every snippet prints 902b49fa8b0828b44d8ac069111899bbfaf51d334485e4b28e90c93f63bb86dd for hello world, the same as the tool. They are run against PHP's hash() before each release.

PHP
echo hash('snefru', 'hello world');

Python, JavaScript, Java and Go have no built-in function for it. If you use a library, compare its output with the test values above.

Test values

Snefru test values

Hashes of common test strings (UTF-8, no line break). Use them to check your own implementation.

Inputsnefru
empty string8617f366566a011837f4fb4ba5bedea2b892f3ed8b894023d16ae344b2be5881
abc7d033205647a2af3dc8339f6cb25643c33ebc622d32979c4b612b02c4903031b
hello world902b49fa8b0828b44d8ac069111899bbfaf51d334485e4b28e90c93f63bb86dd
The quick brown fox jumps over the lazy dog674caa75f9d8fd2089856b95e93a4fb42fa6c8702f8980e11d97a142d76cb358
Common mistakes

Why your Snefru doesn't match

snefru = snefru256

PHP lists both names, but they are the same 256-bit algorithm and always give the same result.

A line break sneaks in

echo "hello world" | sha256sum hashes 12 bytes: the text plus a line break. Use printf '%s' 'hello world' or echo -n to hash exactly 11 bytes.

Same text, different bytes

The tool hashes UTF-8 bytes, like most languages. Windows APIs and .NET's Encoding.Unicode use UTF-16, older systems Latin-1. "ü" is 2 bytes in UTF-8, 1 in Latin-1, 2 in UTF-16, and each gives a different hash.

Upper or lower case

Hex is not case-sensitive: 5EB63BBB… and 5eb63bbb… are the same hash. Compare in one case, and watch for spaces or a prefix like "sha256:".

This tool trims and uses CRLF

Like the form on the original site, the tool removes spaces and line breaks at the start and end and sends line breaks as CRLF (\r\n). For exact bytes use "Hash a file" or "Exactly as typed" in the check panel.

Compare

Whirlpool, Snefru and GOST side by side

The same text, every historic algorithm. Shown for hello world; type in the tool above to use your text.

AlgorithmHashBits
whirlpool8d8309ca6af848095bcabaf9a53b1b6ce7f594c1434fd6e5177e7e5c20e76cd30936d8606e7f36acbef8978fea008e6400a975d51abe6ba4923178c7cf90c802512
snefru902b49fa8b0828b44d8ac069111899bbfaf51d334485e4b28e90c93f63bb86dd256
snefru256902b49fa8b0828b44d8ac069111899bbfaf51d334485e4b28e90c93f63bb86dd256
gost1bb6ce69d2e895a78489c87a0712a2f40258d1fae3a4666c23f8f487bef0e22a256
gost-cryptoc5aa1455afe9f0c440eec3c96ccccb5c8495097572cc0f625278bd0da5ea5e07256
Measured on your device

How fast is Snefru?

Hashes up to 4 MB of random data in your browser and compares with sha256, xxh3. Browser numbers are lower than native code, but the ranking holds.

FAQ

Questions about Snefru

Can Snefru be decrypted?

No. Snefru is a one-way function: there is no key and no way to compute the input from the hash. Sites that "decrypt" Snefru look the hash up in large tables of known inputs, which only works for short or common strings.

How long is a Snefru hash?

A Snefru hash is always 256 bits, written as 64 hexadecimal characters (32 bytes), no matter how long the input is.

Is Snefru secure?

No. Collisions for Snefru can be created on purpose, so it must not be used for signatures, certificates or anything an attacker could exploit. It is still fine to detect accidental corruption.

Should I hash passwords with Snefru?

No. Snefru is fast, so attackers can test huge numbers of guesses. Use Argon2id, bcrypt or scrypt with a unique salt per password.

Is snefru the same as snefru256?

Yes. In PHP both names give the same 256-bit result.

Good to know

Before you rely on it

Searches the list of pages on this site. What you type stays in your browser.