SHA-384 Hash Generator
Generate SHA-384 hash from any text
Input Text
SHA-384 Hash
SHA-384 hash will appear here…
What Is SHA-384 Hashing?
SHA-384 is a cryptographic hash function defined in NIST FIPS 180-4 as part of the SHA-2 family. It accepts an input of arbitrary length and produces a fixed 384-bit (48-byte) message digest, typically displayed as a 96-character hexadecimal string. SHA-384 is widely used in TLS cipher suites, digital certificate signatures, and government systems that require a higher collision-resistance margin than SHA-256 provides.
Internally, SHA-384 is a truncated variant of SHA-512. It uses the same 1024-bit block size, 80 compression rounds, and 64-bit word arithmetic as SHA-512, but starts with a different set of initial hash values (derived from the 9th through 16th primes) and outputs only the first 384 bits of the final state. This truncation means SHA-384 produces a different digest from SHA-512 for identical inputs, despite sharing the same core algorithm.
Because SHA-384 operates on 64-bit words, it runs faster than SHA-256 on modern 64-bit processors while delivering a larger digest. This makes it a practical middle ground: stronger than SHA-256 (192-bit collision resistance vs. 128-bit) without the storage overhead of SHA-512's 128-character hex output. SHA-384 is the default hash for TLS 1.3 certificate verify signatures and is required by NSA Suite B (now CNSA) for TOP SECRET data.
Why Use an Online SHA-384 Generator?
Generating SHA-384 hashes typically requires a terminal command or writing code. This browser-based tool lets you compute SHA-384 digests instantly without installing anything or sending data to a server. Whether you need to generate an SRI hash for a CDN asset, verify a file checksum, or compare SHA-384 output against SHA-256 for the same input, this tool gives you an immediate, dependency-free way to work with SHA-384 digests in any modern browser.
SHA-384 Hash Generator Use Cases
SHA-2 Family Variant Comparison
SHA-384 belongs to the SHA-2 family alongside several other variants. The table below shows how they differ in digest size, output length, and typical applications.
| Variant | Digest | Hex Length | Bytes | Best For |
|---|---|---|---|---|
| SHA-384 | 384 bits | 96 hex chars | 48 bytes | TLS 1.2/1.3, government/CNSA, certificate signatures |
| SHA-256 | 256 bits | 64 hex chars | 32 bytes | TLS, blockchain, code signing, JWTs, SRI |
| SHA-512 | 512 bits | 128 hex chars | 64 bytes | Digital signatures, HMAC with large keys |
| SHA-224 | 224 bits | 56 hex chars | 28 bytes | Truncated SHA-256 — rare, specific compliance |
| SHA-512/256 | 256 bits | 64 hex chars | 32 bytes | SHA-512 speed on 64-bit CPUs, 256-bit output |
SHA-384 vs SHA-256 vs SHA-512 vs SHA-3-384
Choosing between SHA-384 and other hash algorithms depends on your security requirements, platform constraints, and performance needs. This comparison covers the most relevant properties.
| Property | SHA-384 | SHA-256 | SHA-512 | SHA-3-384 |
|---|---|---|---|---|
| Digest size | 384 bits (96 hex) | 256 bits (64 hex) | 512 bits (128 hex) | 384 bits (96 hex) |
| Internal state | 512 bits (8x64-bit) | 256 bits (8x32-bit) | 512 bits (8x64-bit) | 1600 bits (sponge) |
| Block size | 1024 bits | 512 bits | 1024 bits | 832 bits |
| Rounds | 80 | 64 | 80 | 24 |
| Word size | 64 bits | 32 bits | 64 bits | N/A (sponge) |
| Length extension | Resistant | Vulnerable | Vulnerable | Resistant |
| 64-bit performance | Fast (native ops) | Slower (32-bit ops) | Fast (native ops) | Moderate |
| Standard | FIPS 180-4 | FIPS 180-4 | FIPS 180-4 | FIPS 202 |
| Web Crypto API | Yes | Yes | Yes | No |
How SHA-384 Works Internally
SHA-384 processes input through the same Merkle–Damgård construction as SHA-512. The input is padded to a multiple of 1024 bits, split into blocks, and each block is processed through 80 rounds of mixing using Ch, Maj, and two Sigma functions with 64-bit word arithmetic. The key difference from SHA-512 is the initial hash values: SHA-384 uses values derived from the fractional parts of the square roots of the 9th through 16th primes, while SHA-512 uses the first 8 primes. After all blocks are processed, SHA-384 truncates the 512-bit internal state to its first 384 bits.
SHA-384: fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd
(384 bits = 48 bytes = 96 hex characters)
The truncation and different initialization mean SHA-384 and SHA-512 always produce different digests for the same input. This also makes SHA-384 inherently resistant to length-extension attacks, unlike SHA-256 and SHA-512 where an attacker can append data and compute a valid hash without knowing the original message.
SHA-384 Code Examples
SHA-384 is supported natively in all major languages and runtimes. Below are working examples you can copy directly into your projects.
// Works in all modern browsers and Node.js 18+
async function sha384(text) {
const data = new TextEncoder().encode(text)
const hashBuffer = await crypto.subtle.digest('SHA-384', data)
const hashArray = Array.from(new Uint8Array(hashBuffer))
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('')
}
await sha384('hello world')
// → "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd"
// Node.js (built-in crypto module)
const crypto = require('crypto')
crypto.createHash('sha384').update('hello world').digest('hex')
// → "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd"import hashlib
# Basic SHA-384 hash
result = hashlib.sha384(b'hello world').hexdigest()
print(result)
# → "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd"
# Hash a string with Unicode characters
text = 'café ☕'
hashlib.sha384(text.encode('utf-8')).hexdigest()
# → 96-character hex string
# Hash a file in chunks (memory-efficient)
with open('release.tar.gz', 'rb') as f:
sha = hashlib.sha384()
for chunk in iter(lambda: f.read(8192), b''):
sha.update(chunk)
print(sha.hexdigest())package main
import (
"crypto/sha512"
"fmt"
)
func main() {
data := []byte("hello world")
// SHA-384 lives in the crypto/sha512 package
hash := sha512.Sum384(data)
fmt.Printf("%x\n", hash)
// → fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd
}# Using sha384sum (Linux) echo -n "hello world" | sha384sum # → fdbd8e75a67f29f701a4e040385e2e23... - # macOS echo -n "hello world" | shasum -a 384 # → fdbd8e75a67f29f701a4e040385e2e23... - # Using openssl (cross-platform) echo -n "hello world" | openssl dgst -sha384 # → SHA2-384(stdin)= fdbd8e75a67f29f701a4e040385e2e23986303ea... # Verify a file checksum sha384sum myfile.bin > checksum.txt sha384sum -c checksum.txt # → myfile.bin: OK