Format Code Now
/
Hash & generateSHA-512/256 Hash Generator Next: SHAKE256 Hash Generator ›

SHA-512/256 Hash Generator

HG-31

Paste text to get its SHA-512/256 hash, 64 hex characters long. It is computed in your browser as you type, and the text is read as UTF-8.

Runs in your browser. Nothing is uploaded.

Text (hashed as UTF-8)

SHA-512/256 hash

How to use it

  1. Type or paste your text into the input box. Sample loads the quick brown fox sentence.
  2. The SHA-512/256 hash appears as you type.
  3. Choose lowercase hex, UPPERCASE hex or Base64 for the output.
  4. Tick Ignore one trailing line break if your text ends with a newline you do not want hashed.
  5. Copy the result, or download it as a .txt file.

What SHA-512/256 is

SHA-512/256 is one of the truncated variants in FIPS 180-4. It runs the SHA-512 steps on 64-bit words from its own starting values and keeps the first 256 bits, so the result is the same length as SHA-256. Because the starting values differ, it is not the first half of a SHA-512 hash of the same text. Web Crypto does not offer it, so this page includes its own implementation and checks it against published test values such as the hash of "abc".

Exactly what gets hashed

The text in the box is encoded as UTF-8 and hashed as typed. A space or a line break at the end changes the result, which is why the trailing line break option exists. A lone surrogate half is replaced with U+FFFD before hashing. This hashes text, not files. It is a fast hash, so on its own it is the wrong choice for storing passwords, which need a slow, salted function such as bcrypt, scrypt or Argon2.

Questions people ask

How do I generate a SHA-512/256 hash online?

Type or paste your text into the box and the SHA-512/256 hash appears straight away. Pick hex or Base64, then copy it or download it as a .txt file. It is computed in your browser.

What is the difference between SHA-512/256 and SHA-256?

Both give 256 bits, but SHA-512/256 works on 64-bit words with 80 rounds, and SHA-256 on 32-bit words with 64 rounds. They give different hashes for the same text, so match the one your system names.

Is SHA-512/256 just SHA-512 cut to 256 bits?

No. It starts from different initial values, so its output is not the first 32 bytes of a plain SHA-512 hash of the same input. The two differ from the first character.

What is the SHA-512/256 hash of "abc"?

It is 53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23 in hex, which is the value in the NIST examples for this function. Type abc into the box, with no trailing line break, to see it.

How long is a SHA-512/256 hash?

It is 256 bits, which is 32 bytes. In hex that is 64 characters, and in Base64 it is 44 characters including a padding sign. The length does not depend on the size of the text you hash, short or long.

About this tool

SHA-512/256 is defined in FIPS 180-4. It runs the SHA-512 steps (64-bit words, 80 rounds) from its own set of starting values and keeps the first 32 bytes, giving a 64-character hex result. It is not the first 256 bits of a SHA-512 hash: the two differ from the first character. Web Crypto does not offer it, so it is written out in this page's own code and checked against published test values. 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.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.