SHA-2 Hash Calculator

Calculate SHA-224, SHA-256, SHA-384, and SHA-512 of the same text in one pass. SHA-2 isn't a single algorithm, it's a family sharing one Merkle–Damgård design across four output sizes, and this tool shows all four side by side. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-25

Overview

Introduction

"SHA-2" refers to a family of four related hash functions, not one algorithm, and people asking for "the SHA-2 hash" usually mean SHA-256 specifically without realizing there are three other lengths in the same family.

This tool computes all four common SHA-2 lengths, SHA-224, SHA-256, SHA-384, and SHA-512, from a single input in one pass, so you can compare them directly or grab whichever length you actually need.

What Is SHA-2 Hash Calculator?

SHA-2 is the hash function family NIST standardized in FIPS 180-2 (2001) as the successor to SHA-1, built on the same general Merkle–Damgård construction but with a strengthened compression function and larger state.

The family splits into a 32-bit-word half (SHA-224, SHA-256) and a 64-bit-word half (SHA-384, SHA-512), each processed in 64 or 80 rounds respectively; SHA-224 and SHA-384 are simply truncated variants of SHA-256 and SHA-512 with different initial values.

How SHA-2 Hash Calculator Works

Your UTF-8 text is independently run through this category's existing SHA-224, SHA-256, SHA-384, and SHA-512 implementations (from @noble/hashes), each with its own padding, word size, and round count per FIPS 180-4.

The four resulting hex digests are combined into one labeled, multi-line output so you can read or copy any of them without running four separate tools.

When To Use SHA-2 Hash Calculator

Use this when you want a quick side-by-side comparison of SHA-2 lengths, or when a spec or form just says "SHA-2" and you need to see all the reasonable candidates at once.

If you already know you need exactly one length, e.g., matching a published SHA-256 checksum, the dedicated single-length tools are more direct.

Features

Advantages

  • Saves running the same input through four separate tools when comparing SHA-2 lengths.
  • Makes the family relationship between SHA-224/256 and SHA-384/512 visually obvious.
  • Reuses this category's already-audited per-length implementations rather than adding a new code path.

Limitations

  • Not a single canonical "SHA-2 hash"; if a system expects exactly one specific length, you still need to pick the matching line from the output.
  • Slightly more computation than a single-length tool, though negligible for any input you'd paste into a browser textarea.

Examples

Hashing a short greeting across all four lengths

Input

Hello, world!

Output

SHA-224: 8552d8b7a7dc5476cb9e25dee69a8091290764b7f2a64fe6e78e9568
SHA-256: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
SHA-384: 55bc556b0d2fe0fce582ba5fe07baafff035653638c7ac0d5494c2a64c0bea1cc57331c7c12a45cdbca7f4c34a089eeb
SHA-512: c1527cd893c124773d811911970c8fe6e857d6df5dc9226bd8a160614c0cd963a4ddea2b94bb7d36021ef9d865d5cea294a82dd49a0bb269f51f6e7a57f79421

All four SHA-2 lengths of the same 13-byte UTF-8 input, computed in one pass and clearly labeled.

Best Practices & Notes

Best Practices

  • Default to SHA-256 unless you have a specific reason (protocol requirement, storage budget, matching an existing published hash) to pick a different length.
  • When matching an externally published checksum, confirm which exact SHA-2 length it used before comparing, a 256-bit and 512-bit digest of the same input share nothing.
  • Use the SHA-3 Hash Calculator alongside this one if you want to compare the two structurally different NIST-standardized families.

Developer Notes

This tool adds no new hashing logic: it calls this category's existing calculateSha224Hash/calculateSha256Hash/calculateSha384Hash/calculateSha512Hash functions (all backed by @noble/hashes) and formats the four results into one labeled multi-line string. If any individual digest fails to compute, the whole tool reports an error rather than a partial result.

SHA-2 Hash Calculator Use Cases

  • Comparing all four SHA-2 lengths for the same input side by side
  • Quickly seeing which length a partially specified "SHA-2 checksum" in documentation might refer to
  • Teaching the SHA-2 family's shared design and different output sizes
  • Filling in multiple checksum fields (e.g. SHA-256 and SHA-512) from one paste

Common Mistakes

  • Treating "SHA-2" and "SHA-256" as synonyms when a spec might mean a different family length.
  • Comparing a SHA-224 digest against a SHA-256 one and expecting any relationship beyond both being SHA-2 family members with different truncation and initial values.
  • Forgetting SHA-3 is a structurally different, separately standardized family, not "SHA-2 but newer."

Tips

  • Need just one length reliably referenced by URL or API? Use the dedicated SHA-256 or SHA-512 tool instead of this family view.
  • Pair with the SHA-3 Hash Calculator to compare Merkle–Damgård (SHA-2) against sponge-construction (SHA-3) output for the same text.

References

Frequently Asked Questions