Skip to content

SHA-512 Hash Generator

Generate a SHA-512 hash of any text in your browser. SHA-512 has a larger output (128 hex chars) and slightly higher collision resistance than SHA-256.

SHA-512 is a cryptographic hash function from the SHA-2 family, standardized by NIST in FIPS 180-4. It takes input of any size and produces a 512-bit (64-byte / 128-hex-character) digest. The tool above computes the digest in your browser using the Web Crypto API; the input never leaves your machine.

What changes from SHA-256

The SHA-512 algorithm is structurally similar to SHA-256 but operates on 64-bit words instead of 32-bit:

PropertySHA-256SHA-512
Digest size256 bits / 64 hex chars512 bits / 128 hex chars
Block size512 bits1024 bits
Word size32 bits64 bits
Rounds per block6480
Speed on x86_64 / ARM64baselineoften 1.3–1.5× faster
Speed on 32-bit MCUbaselineslower (64-bit ops emulated)

The 64-bit internals mean SHA-512 hashes more bits per CPU cycle on modern 64-bit processors. On 32-bit embedded hardware, the 64-bit operations have to be emulated and SHA-512 is the slower choice.

A worked example

Input:  "hello"
SHA-512: 9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043

A 128-hex-character output. Change the input by one bit and the digest scrambles entirely.

When to pick SHA-512 over SHA-256

  • Throughput matters and the platform is 64-bit. Bulk integrity hashing of large files on a server.
  • You want a 512-bit digest specifically. Some protocols specify it. HMAC-SHA-512 is the default in some cryptographic constructions.
  • Defense-in-depth against future cryptanalysis. SHA-256 has 128 bits of collision-resistance margin; SHA-512 has 256 bits. Today the difference is academic; for very long-lived signatures (decades), the larger margin can be a hedge.

When to not pick SHA-512:

  • Embedded / constrained devices. SHA-256 is faster on 32-bit MCUs.
  • Compatibility with widely-deployed defaults. TLS, JWT (HS256/RS256), and Git default to SHA-256. Picking SHA-512 means more interop friction.
  • You don’t have a specific reason. SHA-256 is the default; SHA-512 is the choice when you can articulate why the larger digest helps.

SHA-512/256 and SHA-512/224

NIST also standardized truncated SHA-512 variants — SHA-512/256 and SHA-512/224 — that run the SHA-512 algorithm but emit only the first 256 or 224 bits of the digest. The point is to get SHA-256-class output from a SHA-512-speed core on 64-bit CPUs. These variants are rarely used in practice; most code that needs 256-bit output uses SHA-256 directly. The tool above emits standard SHA-512 (full 512-bit digest).

Speed is still a problem for passwords

SHA-512 is fast — billions of bytes per second on a modern CPU. The same warning that applies to SHA-256 applies here: do not store passwords as sha512(password). Use a deliberately-slow password hash (Argon2, bcrypt, scrypt) or an iterated KDF (PBKDF2-SHA-512 with 200,000+ iterations is the OWASP floor for SHA-512-based PBKDF2).

The password strength checker evaluates the strength of the password itself; how the server hashes it for storage is a separate decision the server makes.

What SHA-512 isn’t

  • Not encryption. A hash has no inverse. SHA-512 is one-way by design.
  • Not stronger than SHA-256 in any practical sense today. Both are unbroken; both have collision-resistance margins far beyond computational reach. SHA-512’s larger output is a long-term hedge, not a present-day improvement.
  • Not a substitute for HMAC. A bare hash doesn’t authenticate — anyone who can recompute the input can recompute the hash. For message authentication, use HMAC-SHA-512 (or HMAC-SHA-256, which is more common).
  • Not deterministically faster than SHA-256. Faster on 64-bit, slower on 32-bit. Benchmark on your target if it matters.

Common pitfalls

  • Truncating output without using a defined truncated variant. If you take the first 256 bits of a SHA-512 digest, you don’t get SHA-512/256 — that variant uses different initial constants. Truncating naively is fine for non-cryptographic use but wrong for protocol implementations that specify SHA-512/256.
  • Hex vs base64 confusion. SHA-512’s 64 raw bytes are 128 hex characters or 88 base64 characters (with padding). The bytes are the same; the encoding differs.
  • Assuming “bigger is better.” A 512-bit digest is overkill for most application use. Larger digests waste space in databases and indexes for no defensive gain that matters in practice.

For the SHA-256 variant, see SHA-256. For all four common algorithms in one tool, see hash generator.