SHA512 Hash Generator

Hash text or a file with SHA-512, then paste the checksum a project published and see straight away whether the two agree. Everything runs through the browser Web Crypto API, so no bytes leave the tab.

SHA-512 hashing console

Known test vectors
512 bit digest
Type something or pick a file. The digest appears here.

Case, spacing and the filename column are ignored. A Base64 digest is decoded before the comparison.

SHA-512 runs on the exact bytes you give it. A trailing newline or a leading space changes the whole digest.

SHA-512 is usually the faster one, which surprises people

The intuition says a 512-bit hash costs twice as much as a 256-bit hash. On a 64-bit processor without hardware hash instructions, the opposite holds. SHA-512 works on 64-bit words and swallows 1024 bits per block, against 32-bit words and 512-bit blocks for SHA-256. It runs 80 rounds instead of 64, but each round moves twice the data, so the throughput per byte lands around 30 to 50 percent better.

Then Intel shipped SHA-NI in 2016, accelerating SHA-1 and SHA-256 in silicon while leaving SHA-512 to plain software. On most x86 desktops and servers sold since, the ranking flips and SHA-256 wins by a wide margin. Recent Intel and ARMv8.2 parts add SHA-512 instructions, so the answer depends on the exact chip in front of you. If you benchmark one machine and generalise, you will be wrong on the next one.

None of this decides your algorithm choice. Both are unbroken, both are FIPS approved, and disk speed dominates file hashing long before the hash does. Pick SHA-512 when a protocol asks for it, when you want the wider output for key derivation, or when the checksum file you are checking against was made with it.

The SHA-2 family, side by side

All six variants share one compression function design. The differences are word size, output length, initial values, and whether the output is truncated.

VariantWord sizeBlockRoundsDigestHex charsResists length extension
SHA-22432 bit512 bit64224 bit56Yes
SHA-25632 bit512 bit64256 bit64No
SHA-38464 bit1024 bit80384 bit96Yes
SHA-51264 bit1024 bit80512 bit128No
SHA-512/22464 bit1024 bit80224 bit56Yes
SHA-512/25664 bit1024 bit80256 bit64Yes

The truncated variants are not SHA-512 with the end cut off. Each starts from its own set of initial values, derived by running SHA-512 over the variant name with every initial word flipped by 0xa5a5a5a5a5a5a5a5. Chop 256 bits off a SHA-512 digest yourself and you get a different number from what SHA-512/256 produces. People building interoperable code discover this the expensive way.

Length extension, the property nobody mentions until it bites

SHA-512 follows the Merkle-Damgård construction. The digest is the internal state after the final block, published in full. Anyone holding a digest holds the machine state, and they resume from there.

Say a service authenticates requests by sending sha512(secret || message). An attacker who never learns the secret still forges a valid tag:

// what the server computestag = sha512(secret + "user=bob&role=guest")// what an attacker sends, knowing only the tag and the messageforged_message = "user=bob&role=guest" + padding + "&role=admin" forged_tag = sha512_resume(tag, "&role=admin")// the server recomputes and agrees, without the secret ever leaking

The padding block is deterministic, so the attacker constructs it from the known message length alone. Three fixes work, in order of preference: use HMAC-SHA-512, switch to a truncated variant like SHA-512/256, or move to SHA-3, whose sponge design never exposes the full state. Never patch it by reordering to sha512(message || secret), which trades one weakness for another.

The plain digest field above is the naked construction. For anything an attacker benefits from forging, wrap it in HMAC.

Checking a download against SHA512SUMS

This is the job SHA-512 does most often. Debian, Arch, Tails, Fedora and most language runtimes publish a checksum file next to the release, and the comparison catches a corrupted transfer or a swapped mirror before you run the installer.

  1. Download the release file and the checksum file from the project site, not from the mirror serving the download.
  2. Open the checksum file and find the line for your exact filename. A release with 40 architecture builds has 40 lines, and picking the wrong one produces a mismatch nothing is wrong with.
  3. Drop your download into the File tab above and wait for the digest.
  4. Paste the whole line, filename column included, into the compare box. The filename and spacing are stripped before the check.
  5. On a match, verify the checksum file signature with GPG. Without that step you proved the file arrived intact, not the correct file to begin with.

The same check from a terminal:

# Linuxsha512sum ubuntu.iso sha512sum -c SHA512SUMS 2>&1 | grep OK# macOSshasum -a 512 ubuntu.iso# Windows PowerShellGet-FileHash ubuntu.iso -Algorithm SHA512# Windows cmd, output arrives spaced and uppercasecertutil -hashfile ubuntu.iso SHA512

Hexadecimal case carries no meaning. CF83E1 and cf83e1 are the same number, and the compare box treats them as equal. PowerShell returns uppercase, sha512sum returns lowercase, and certutil inserts a space every two characters, which is why a visual comparison of two correct digests so often looks wrong.

Where SHA-512 actually turns up

Inside signature schemes

Ed25519 hashes with SHA-512 at two points in every signature, over the private key during expansion and over the message during signing. Anyone using modern SSH keys or Signal runs SHA-512 constantly without naming it.

Key derivation

A BIP-39 mnemonic becomes a wallet seed through PBKDF2 with HMAC-SHA-512 across 2048 iterations. HKDF-SHA-512 does the same job in TLS deployments and in application key hierarchies, where the 512-bit output splits into several independent keys.

File integrity at rest

Backup catalogues, archive manifests and package databases store SHA-512 digests because the wider output leaves room for decades of storage without collision worries. ZFS offers it as a checksum algorithm for the same reason.

Not in Bitcoin

Bitcoin mining is double SHA-256. The SHA-256 generator is the page for that, and the confusion comes from SHA-512 sharing a family name rather than a role.

What this page will not do

No reverse lookup. A digest discards the input, and no database sits behind the field. Sites claiming to decrypt SHA-512 are searching precomputed lists of common passwords, which works on letmein and on nothing you would want protected.

No streaming for very large files. Web Crypto needs the whole file in memory before it hashes, so the tool refuses anything over 1.5 GB and a phone browser will run out of room well before then. Reach for sha512sum on a multi-gigabyte image.

No HMAC, no salt, no iteration count. Keyed digests belong in the HMAC Generator, and one input across several algorithms at once belongs in the Hash Generator Suite.

No batch mode. The compare box handles one digest against one input. Checking a folder of files against a full manifest is what Checksum Validator is for.

One more limit worth stating plainly. A matching digest proves the bytes match a value someone published. Whether the publisher was legitimate is a signature question, and no hash tool answers it.

SHA-512 questions that come up mid-task

Mismatches, format surprises and the security questions worth a straight answer.

Why does my SHA-512 differ from the one on the website?

A trailing newline, nine times out of ten. Running echo "abc" | sha512sum feeds four bytes because echo appends a newline, giving a digest unrelated to the three byte version. Use printf "%s" abc or echo -n instead. The other usual causes are a UTF-8 byte order mark at the start of a saved file, Windows CRLF line endings against a Unix original, and copying a digest with a stray space attached. The byte counter under the digest above catches all four.

Is SHA-512 more secure than SHA-256?

On paper, yes. Collision resistance sits near 2^256 operations against 2^128 for SHA-256, and preimage resistance at 2^512 against 2^256. In practice both numbers are far past anything buildable, so the difference has no bearing on real security. Published cryptanalysis reaches only reduced-round versions of either. Choose on protocol requirements and output width, not on the bigger number.

Can a SHA-512 hash be reversed or decrypted?

No, and it is not encryption, so there is nothing to decrypt. Any input of any length compresses to 64 bytes and the rest is thrown away. What people call cracking is guessing candidate inputs and hashing each one until a digest matches, which works against short common passwords and fails against a 30 byte random string.

Should I store user passwords as SHA-512?

No. SHA-512 is built for speed, and speed helps the attacker who stole your database far more than it helps you. Argon2id is the current recommendation, with scrypt and bcrypt as accepted alternatives. Each adds a salt and a tunable work factor so a single guess costs milliseconds instead of nanoseconds.

What is the $6$ value in /etc/shadow?

SHA-512-crypt, which uses SHA-512 as a building block rather than applying it directly. The format is $6$salt$hash, and the compression function runs 5000 times by default, adjustable through the rounds parameter. Hashing the same password on this page produces a completely different value, and that is expected rather than a fault.

What is a length extension attack and does it affect me?

SHA-512 publishes its full internal state as the digest, so anyone holding sha512(secret + message) appends extra data and computes a valid digest for the longer message without knowing the secret. It matters only when a digest authenticates something. Use HMAC-SHA-512 for message authentication, or SHA-512/256 and SHA-384, which truncate the state and close the gap. Plain file checksums are unaffected.

Why is my SHA-512 output 88 characters instead of 128?

You are looking at Base64 rather than hex. The digest is 64 raw bytes, written as 128 hex characters or as 88 Base64 characters ending in two equals signs. Java, .NET and several APIs default to Base64. The format buttons above switch between the two, and the compare box decodes Base64 before checking.

Does SHA-512 survive quantum computers?

Better than most things in cryptography. Grover search cuts preimage resistance roughly in half, leaving around 256 bits of effective security, which stays comfortable. Collision search gains less than early estimates suggested. Signature algorithms and key exchange are where quantum planning matters. Hash functions are the part already prepared.

How is SHA-512 different from SHA-3-512?

Only the output size matches. SHA-2 uses the Merkle-Damgard construction from the same lineage as MD5 and SHA-1. SHA-3 uses Keccak, a sponge with an entirely different internal design, standardised in 2015 so a future break of SHA-2 would not take everything down at once. SHA-3 is immune to length extension by construction and runs slower in software on most hardware. No attack forces a move today.

Are the files I hash here uploaded anywhere?

No. Hashing calls the browser Web Crypto API through crypto.subtle.digest, which runs inside the tab with no network access. Files are read locally through FileReader. Load the page once and it keeps working with the connection cut.