BLAKE2b and BLAKE2s hash generator
Type text or paste hex bytes, choose BLAKE2b or BLAKE2s and the digest length, and get the hash at once. With a key, BLAKE2 works as a message authentication code without HMAC. Nothing leaves your browser.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Type or paste the input. Choose “Hex bytes” to hash raw bytes such as
616263.
- Choose BLAKE2b or BLAKE2s and the digest length in bytes: 64 and 32 are the full sizes, 32 bytes of BLAKE2b is the common “BLAKE2b-256”.
- Optionally enter a key to get a keyed hash (MAC).
- Copy the result in hex or Base64.
How it works
BLAKE2 (RFC 7693) splits the input into blocks — 128 bytes for BLAKE2b, 64 for BLAKE2s — and mixes each one into an 8-word state with 12 or 10 rounds of the G function. The state starts from fixed constants XORed with a parameter block holding the digest length, key length, fanout and depth. The last block is flagged, and the digest is the first n bytes of the final state written little-endian.
Example
The RFC 7693 test string abc gives:
- BLAKE2b, 64 bytes:
ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923
- BLAKE2s, 32 bytes:
508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982
- BLAKE2b, 32 bytes:
bddd813c634239723171ef3fee98579b94964e3bb1cb3e427262c8c068d52319
The line above the result says “3 input bytes → 64-byte digest (512 bits)”.
Tips
- Python’s
hashlib.blake2b(data, digest_size=32, key=k) and the b2sum command use the same definition, handy for checking.
b2sum prints BLAKE2b-512 by default; b2sum -l 256 gives the 32-byte version.
- Keep keys secret and random: a keyed hash is only as strong as its key.
Frequently asked questions
What is the difference between BLAKE2b and BLAKE2s?
BLAKE2b works on 64-bit words and gives digests up to 64 bytes; it is fastest on 64-bit processors. BLAKE2s works on 32-bit words, gives up to 32 bytes and suits 32-bit and small devices. Both are defined in RFC 7693.
Is BLAKE2b-256 the same as BLAKE2b-512 cut short?
No. The digest length is part of the parameters that start the computation, so BLAKE2b with 32 bytes gives a completely different value from the first 32 bytes of BLAKE2b-512.
How does keyed BLAKE2 work?
The key, padded with zeros to a full block, is processed before the message, and its length is mixed into the parameters. The result is a MAC: only someone with the key can produce or check it. BLAKE2 does not need the HMAC construction for this.
Is BLAKE2 secure?
BLAKE2 is a modern cryptographic hash used, for example, in Argon2 and WireGuard. For storing passwords, though, use a slow password hash such as Argon2, bcrypt or PBKDF2, not a plain fast hash.
Why does my hash differ from another tool?
Check the variant, the digest length, the key and the input: a trailing newline or a different text encoding changes everything. This tool hashes text as UTF-8 bytes.