FormatterHQ

SHAKE-128 Hash Generator

Compute SHAKE128 — the SHA-3 extendable-output function — with the exact output length you need, from 8 to 8192 bits.

Loading tool…
Ready.

How to use the SHAKE-128 Hash Generator

  1. Type or paste text into the input box, or switch the source to File and choose a file — it is hashed locally, never uploaded.
  2. Set Output length (bits); the main result at the top updates as soon as you change it.
  3. Read the main hash at the top — the table below shows the same input under every other common algorithm. Tick Uppercase hex if you need capitals.
  4. To verify a value, paste it into Compare with an expected hash — the tool reports a match, or which algorithm it matches instead. Copy any row with its Copy button.

SHAKE128: a hash with adjustable length

SHAKE128 is an extendable-output function (XOF) defined in FIPS 202 alongside the SHA-3 hashes. Instead of a fixed digest, it can squeeze out as many bits as you ask for. This SHAKE128 generator lets you choose any length that is a multiple of 8 bits, from 8 to 8192, and computes it for text or files.

Example

Input:

The quick brown fox jumps over the lazy dog

SHAKE128, 256-bit output:

f4202e3c5852f9182a0430fd8144f0a74b95e7417ecae17db0f8cfeed0e3e66e

With the output length set to 128 bits the result is f4202e3c5852f9182a0430fd8144f0a7 — exactly the first half of the 256-bit output. Shorter SHAKE outputs are always prefixes of longer ones, which is a defining property of XOFs.

At a glance

PropertyValue
Output lengthAny; this tool supports 8–8192 bits
Rate / capacity1344 / 256 bits of the 1600-bit Keccak state
SecurityUp to 128 bits (collision resistance is limited to half the output length)
StandardFIPS 202 (2015)

Choosing the output length

Security is the smaller of 128 bits and what the output length allows. For collision resistance, you need at least 256 bits of output to reach the full 128-bit level; a 128-bit output only gives 64-bit collision resistance. For preimage resistance or key derivation, 128 bits of output already give 128-bit security. Using more than 256 bits of output never increases SHAKE128’s security beyond 128 bits — it just gives you more material.

For the empty input, SHAKE128 with 256 bits of output begins 7f9c2ba4e88f827d… — a quick check that an implementation uses the correct SHAKE padding.

Where SHAKE128 is used

  • Post-quantum cryptography: ML-KEM (Kyber) and ML-DSA (Dilithium) use SHAKE128 to expand seeds into matrices.
  • Deriving several keys or a long stream of pseudorandom bytes from one input.
  • Protocols that need a hash output of a non-standard length without ad-hoc truncation.

Things to know

  • SHAKE128 is not the same as SHA3-256, even at 256 bits of output; the domain separation differs.
  • For 256-bit security, use SHAKE256.
  • In code: Python hashlib.shake_128(data).hexdigest(32) (length in bytes), OpenSSL openssl dgst -shake128 -xoflen 32.

Like other fast hash functions, SHAKE128 is not suitable for storing passwords. The computation runs locally in your browser.

Frequently asked questions

What is an extendable-output function?
An XOF is a hash that can produce output of any requested length. SHAKE128 and SHAKE256 are the XOFs standardised in FIPS 202.
Is a 128-bit SHAKE128 output secure?
It gives 128-bit preimage resistance but only 64-bit collision resistance. Use 256 bits of output if collisions matter.
Why is the short output a prefix of the long one?
An XOF squeezes output from the same sponge state step by step, so asking for more bits only appends to the earlier output.
How do I specify the length in Python?
hashlib.shake_128(data).hexdigest(n) takes the length in bytes, so 256 bits is hexdigest(32).
Why does another tool give a different SHAKE128 value?
Usually the output length differs or is given in different units. Python's hexdigest(32) means 32 bytes, which is 256 bits here; entering 32 in the bits field gives only 8 hex characters. Also check that the other tool is not using cSHAKE128, the customizable variant, which matches SHAKE128 only when its function name and customization string are both empty.
Is SHAKE128 faster than SHA3-256?
Yes, for long inputs. SHAKE128 absorbs 1344 bits per Keccak permutation, while SHA3-256 absorbs 1088, so SHAKE128 needs about 19% fewer permutations for the same data. The price is a lower maximum security level of 128 bits.

Last updated October 3, 2026

Related tools

SHAKE-256 Hash Generator Generate SHAKE-256 extendable-output (XOF) hashes of any length from text or files. SRI Hash Generator Generate Subresource Integrity (SRI) sha384 hashes and ready-to-paste <script> or <link> tags with integrity and crossorigin attributes. SSH Key Generator Generate OpenSSH key pairs (Ed25519, RSA, ECDSA) in id_ed25519 / id_rsa format with fingerprint — created locally, like ssh-keygen. Whirlpool Hash Generator Generate the Whirlpool hash of any text or file online. Instant 512-bit digest in hex, computed in your browser. WordPress Password Hash Checker Check if a password matches a WordPress user_pass hash ($wp$ bcrypt, $P$ phpass or legacy MD5). WordPress Password Hash Generator Create a WordPress password hash for the wp_users table: bcrypt for WordPress 6.8+ or phpass for older versions. SSL Certificate Decoder (X.509) Decode PEM or DER X.509 SSL/TLS certificates: subject, issuer, SANs, validity, key type, extensions and SHA-256 fingerprints. xxHash Generator Generate xxHash XXH32, XXH64, XXH3 and XXH128 hashes with an optional seed. Adler-32 Hash Generator Generate the Adler-32 hash of any text or file online. Instant 32-bit checksum in hex, computed in your browser. Argon2 Hash Generator Hash and verify passwords with Argon2id, Argon2i or Argon2d using custom memory, iterations and parallelism. Runs locally via WebAssembly. Bcrypt Hash Checker Check whether a password matches a bcrypt hash, like PHP password_verify, entirely in your browser. Bcrypt Hash Generator Generate a bcrypt password hash ($2y$) with a configurable cost factor, compatible with PHP password_hash and Laravel.