SHAKE-128 Hash Generator
HG-26Paste text to get its SHAKE128 output, 32 bytes by default. Choose how many bytes you want from 16 to 512, or switch to SHAKE256.
Runs in your browser. Nothing is uploaded.
Text (hashed as UTF-8)
SHAKE hash
How to use it
- Type or paste your text into the input box. Sample loads the quick brown fox sentence.
- Choose SHAKE128 or SHAKE256 in the Function menu, and pick the output length.
- Press Hash. The output appears as lowercase hex, UPPERCASE hex or Base64, as you choose.
- Tick Ignore one trailing line break if your text ends in a newline you do not want hashed, then copy the result.
What SHAKE is
SHAKE128 and SHAKE256 are the extendable-output functions of FIPS 202. They use the same Keccak sponge as SHA-3, but instead of a fixed length you choose how many bytes to read out. The number after SHAKE is the security level, not the output size. A shorter output is the start of a longer one for the same text, so asking for 64 bytes gives the 32-byte value followed by 32 more.
Lengths and checks
The Output length menu offers 16, 32, 48, 64, 128, 256 and 512 bytes. It is a fixed list, not any number, and the default is 32 bytes, which is 64 hex characters. SHAKE128 of the empty string at 32 bytes is 7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26. Web Crypto does not offer SHAKE, so this page carries its own code, checked against the published values and against another implementation.
Exactly what gets hashed
The text is encoded as UTF-8 and hashed as typed. A space or line break at the end changes the result, which is why the trailing line break option exists, and a lone surrogate half is replaced with U+FFFD first. It hashes text, not files. It is a fast function, so it is not a way to store passwords; that needs bcrypt, scrypt or Argon2.
Questions people ask
How do I generate a SHAKE128 hash?
Type or paste your text into the input box, keep Function on SHAKE128 and press Hash. The default output is 32 bytes as 64 hex characters. Use the Output length menu to get more or fewer bytes.
What is SHAKE128 of an empty string?
With 32 bytes of output it is 7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26. Leave the box empty and press Hash to check. This is the standard value for the empty message.
What is the difference between SHAKE128 and SHA3-256?
Both use the Keccak sponge, but SHA3-256 always gives 32 bytes and uses a different padding byte. SHAKE128 lets you choose the length, and its output differs from SHA3-256 even at 32 bytes. They are separate functions.
Can I get more than 32 bytes?
Yes. The Output length menu goes up to 512 bytes, which is 1024 hex characters. A longer output starts with the shorter one for the same text, so choosing more bytes never changes the beginning of the result.
Is the output length the same as the security level?
No. The 128 in SHAKE128 is the security level in bits, not the output size. You can read out any length, but the strength against collisions is capped by the level, so asking for more bytes does not add security.
About this tool
SHAKE128 and SHAKE256 are the extendable-output functions of FIPS 202: the same Keccak sponge as SHA-3, but you choose how many bytes to read out. A shorter output is the start of a longer one for the same text. The default here is 32 bytes (64 hex characters); SHAKE128 of the empty string at 32 bytes is 7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26. It is written out in this page's own code, because Web Crypto does not offer it, and checked against another implementation. The length is a fixed list here, up to 512 bytes, not any number. It is a fast general-purpose hash, so do not use it alone to store passwords: that needs a slow, salted function such as bcrypt, scrypt or Argon2, which this tool is not. The text is hashed exactly as typed, as UTF-8 (a lone surrogate half becomes U+FFFD first), so a trailing line break or a space changes the result; "Ignore one trailing line break" removes one. It hashes text, not files: a file saved with different line endings would give a different hash than the same words typed here.