SHA-256 vs SHA-384: What's the Difference?

Published: January 1, 2026

While comparing members of the SHA-2 family, you will often see SHA-384 listed alongside SHA-256 and SHA-512. What is its purpose?

SHA-384 is a Truncated SHA-512

Interestingly, SHA-384 does not have its own distinct internal mathematical engine. It is actually just the SHA-512 algorithm in disguise.

When computing a SHA-384 hash, the computer runs the full SHA-512 calculation (using 64-bit math words) but simply chops off (truncates) the last 128 bits of the output, leaving exactly 384 bits (96 hexadecimal characters).

Why Does SHA-384 Exist?

It exists as a compromise. As discussed in the SHA-512 comparison, 64-bit processors calculate SHA-512 faster than SHA-256. However, some systems and legacy protocols require a hash output smaller than 512 bits to save bandwidth or fit within strict database constraints. SHA-384 provides the execution speed of SHA-512 on 64-bit systems but with a slightly shorter output.

Conclusion

If you are building a modern web application, standard SHA-256 is almost always the correct choice for broad compatibility. Use SHA-384 only if you explicitly require 64-bit CPU speed optimizations but cannot store a full 512-bit hash.

Further Considerations and Best Practices

When working with cryptographic hashes like SHA-256, it is important to remember that security is an ongoing process. Implementing a hash function correctly is just as critical as choosing a secure algorithm in the first place.

Always ensure that you are using up-to-date cryptographic libraries. Never attempt to "roll your own crypto." The standard libraries provided by modern programming languages (such as Node.js's crypto module, Python's hashlib, or the browser's Web Crypto API) have been rigorously audited by security professionals.

If you need to generate a hash quickly for verification or testing, you can use our free online SHA256 Generator tool. It runs securely in your browser and ensures your data remains private.

Frequently Asked Questions

What is SHA-384?

SHA-384 is a truncated version of SHA-512. It calculates a 512-bit hash internally but only outputs 384 bits.

Why use SHA-384 instead of SHA-512?

SHA-384 provides a balance. It offers 384 bits of security but is designed to protect against a specific cryptographic attack called length extension, which SHA-256 and SHA-512 are theoretically vulnerable to.

Is SHA-384 faster than SHA-256?

Like SHA-512, SHA-384 can be faster than SHA-256 on 64-bit machines because it relies on the same 64-bit internal word structure as SHA-512.

How long is a SHA-384 hash?

A SHA-384 hash is 384 bits long, which is represented as 96 hexadecimal characters.

Is SHA-384 part of SHA-2?

Yes, SHA-384 is a variant in the SHA-2 family.

Ready to generate secure hashes?

Open SHA256 Generator