SHA-512 Hash Generator

Calculate the 512-bit SHA-512 digest of text, hex bytes or a file, check it against an expected value, and see SHA-384, SHA-256, SHA-1, MD5 and CRC-32 of the same input.

All algorithms

Runs entirely in your browser. Nothing is uploaded.

How to use

  1. Enter text or hex bytes, or open a file to hash its contents.
  2. Select an output format: hex for sha512sum-style checksums, Base64 for integrity strings.
  3. Paste an expected value into the Compare with field to check it; hex and Base64 are both accepted.
  4. Need SHA-384? Pick it in the Algorithm select or copy it from the table of all algorithms.

What is SHA-512?

SHA-512 is the SHA-2 function with the longest output, specified in FIPS 180-4 and RFC 6234. Where SHA-256 works on 32-bit words, SHA-512 uses 64-bit words, 1024-bit blocks and 80 rounds, and outputs a 512-bit digest: 128 hex characters or 88 Base64 characters. Its collision resistance of about 256 bits is far beyond any foreseeable attack, and like every hash it is one-way: the input cannot be recovered from the digest.

Because it uses 64-bit arithmetic, SHA-512 is often faster per byte than SHA-256 on 64-bit processors without dedicated SHA-256 instructions. On CPUs that do have them, SHA-256 is usually quicker.

SHA-384, SHA-512/256 and other truncations

Several standard hashes are SHA-512 run with different initial values and cut to a shorter output:

NameOutputHex lengthTypical use
SHA-384384 bits96TLS 1.3 cipher suites, Subresource Integrity
SHA-512/256256 bits64SHA-256-sized output at SHA-512 speed
SHA-512/224224 bits56Rarely used

Because the initial values differ, SHA-512/256 is not the first 64 hex characters of SHA-512. The truncated variants also resist the length-extension attack that affects full SHA-256 and SHA-512. This page computes SHA-384 and SHA-512; for SHA-512/256 use another tool, for example openssl dgst -sha512-256.

Base64 integrity strings and password hashes

Because the hex form is so long, machine-readable formats often carry SHA-512 in Base64. Subresource Integrity accepts sha256-, sha384- and sha512- followed by a Base64 digest, and npm's package-lock.json stores an integrity value for each package, usually starting with sha512-. Open the file, choose Base64 output and add the prefix.

Linux password hashes that start with $6$ are sha512crypt: salted SHA-512 repeated thousands of times, so they never equal a plain SHA-512 of the password. A single SHA-512 of a password is quick to brute-force however long the digest is; store passwords with Argon2id, scrypt, bcrypt or PBKDF2-HMAC-SHA512.

SHA-512 on the command line and in code

sha512sum file.tar.gz                        # Linux
shasum -a 512 file.tar.gz                    # macOS
certutil -hashfile file.tar.gz SHA512        # Windows
Get-FileHash file.tar.gz -Algorithm SHA512   # PowerShell

# Base64 digest for an integrity attribute
openssl dgst -sha512 -binary file.js | openssl base64 -A

# Python
hashlib.sha512(data).hexdigest()

// Node.js
crypto.createHash('sha512').update(data).digest('base64')

On this page SHA-512 is computed by the Web Crypto API in your browser, and the table of all algorithms lists SHA-384, SHA-256, SHA-1, MD5 and CRC values of the same input.

Examples

Input (UTF-8)SHA-512
Hello, World!374d794a95cdcfd8b35993185fef9ba368f160d8daf432d08ba9f1ed1e5abe6cc69291e0fa2fe0006a52570ef18c19def4e617c33ce52ef0a6e5fbe318cb0387
Base64.is44960f483bc929874301e2fb54f4337c84641ad12cb6b2639875e26e490664e65da046cf43eafb2ab4a47b5d3eb66637630af5cba841974bfaa4e372dd0453d2
你好5232181bc0d9888f5c9746e410b4740eb461706ba5dacfbc93587cecfc8d068bac7737e92870d6745b11a25e9cd78b55f4ffc706f73cfcae5345f1b53fb8f6b5

Frequently asked questions

Is SHA-512 more secure than SHA-256?

It has a larger margin, about 256-bit collision resistance against 128-bit for SHA-256, but both are unbroken and far beyond brute force. Pick SHA-512 when a format requires it, when it is faster on your hardware or when you want a longer digest; otherwise SHA-256 is enough.

Can a SHA-512 hash be decrypted?

No. A SHA-512 digest is always 64 bytes, whether the input is one word or a whole disk image, so countless different inputs share each digest and there is nothing to decode. A digest can only be compared with the hash of a guess; lookup sites find common words and passwords that way, but never unpredictable data.

How long is a SHA-512 hash?
64 bytes: 128 hex characters or 88 Base64 characters ending in ==. SHA3-512, BLAKE2b and Whirlpool have the same length, so paste an unknown digest into the Hash Identifier to see which of them fit.
Is SHA-512 the same as SHA3-512?

No. SHA3-512 (FIPS 202) is based on Keccak, a completely different design, and gives a different digest for the same input. This page does not compute SHA-3.

Why do two strings that look the same give different hashes?

The hash covers bytes. A character such as é can be stored as one code point or as e plus a combining accent, and trailing spaces, line endings (LF or CRLF) and the character set (UTF-8, UTF-16, Windows-1252) change the bytes too. Choose the Text encoding the other system used, or paste the exact bytes as hex.