Tested tool guide
Tested browser tools
Checked August 16, 2026
What SRI (Subresource Integrity) Hash Generator does, with a checked example
Paste a CDN URL or the file itself and this tool computes the digest that goes in a script or link tag's integrity attribute, returning sha256, sha384, and sha512 forms ready to copy. The hash covers the file's exact bytes, so it is valid only for that exact version of that exact file: a stray newline, a CRLF conversion, or a CDN republish changes it, and the browser then refuses to run or apply the resource. The usual mistake is hashing different bytes than the browser fetches - copy-pasting from a rendered page instead of the raw file. Computation happens in the browser; nothing is uploaded.
Worked example
A concrete input and expected output from the current implementation.
Input
abc (the three characters with no trailing newline, pasted as file content)
->
Expected output
sha256-ungWv48Bz+pBQUDeXa4iI7ADYaOWF3pctBD/YeQAFa0=
abc is the standard published test vector for SHA-256: the digest is ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad, which base64-encodes to ungWv48Bz+pBQUDeXa4iI7ADYaOWF3pctBD/YeQAFa0=, and the tool prefixes it with sha256-. The result assumes exactly three bytes: add a newline and every character of the output changes.