SHA-384 Hash Generator
Generate a SHA-384 hash of text or files in your browser — the length-extension-resistant SHA-2 digest used in SRI.
Digest
About this input
Import from File
Drag & drop a file here
or
Supports .txt, .csv, .log, .json and other text files
What It Does
This tool computes the SHA-384 digest of text or a file — 384 bits, 96 hexadecimal characters or 64 Base64 characters. SHA-384 runs the SHA-512 engine from different starting values and keeps only 384 bits of the result. Discarding part of the state is what makes it immune to length-extension attacks, and it is the algorithm most CDNs show in their Subresource Integrity snippets.
When to Use It
- You are adding a script from a CDN and need the sha384-… value for its integrity attribute.
- A TLS or government profile such as CNSA requires SHA-384 and you need to produce or check a value.
- You want a SHA-2 digest that cannot be length-extended without switching to HMAC.
- You are checking that a self-hosted copy of a library matches the CDN's published integrity hash.
Worked Examples
abc
Begins cb00753f45a35e8b — the FIPS 180 test vector. Not a prefix of SHA-512("abc"): the starting values differ, not just the length.
console.log('hi');
Switch to Base64 and prefix with sha384- to get an integrity attribute for an inline script file with exactly this content and no trailing newline.
The empty-input digest begins 38b060a751ac9638. A CDN integrity value starting with that means an empty file was hashed.
Features
How to Use
1. Type or paste text, or choose Hash a file to hash a file's raw bytes. 2. Pick the output encoding the value will be compared against — hex is the usual one. 3. To check a published checksum, paste it into the comparison box; the tool tells you whether it matches and, if not, whether it is even the same algorithm.
Common Mistakes
- Hashing text that is not byte-for-byte what the other side hashed. A trailing newline, Windows line endings or a byte-order mark each produce a completely different SHA-384 value, and none of them are visible.
- Comparing a hex digest with a Base64 one. They encode the same bytes differently, so they never look alike even when they match — switch the output format before deciding two values disagree.
- Comparing digests in mixed case and concluding they differ. Hex is case-insensitive; ABCDEF and abcdef are the same value.
- Using a plain SHA-384 digest where a secret is involved. To prove a message came from someone holding a key, you need HMAC, not hash(secret + message).
Frequently Asked Questions
Everything runs in your browser. Text and files are hashed locally — nothing is uploaded, logged or stored.