SRI Hash Generator
HashGenerate Subresource Integrity (SRI) hashes for a script or stylesheet: SHA-256, SHA-384, and SHA-512, ready to drop into an HTML integrity attribute.
Paste the exact content of a script or stylesheet and get back its Subresource Integrity hash for SHA-256, SHA-384, and SHA-512, each formatted as the base64 string an HTML integrity attribute expects. SRI lets a browser verify that a file loaded from a CDN or third-party host hasn't been tampered with, by comparing it against a hash you computed ahead of time. This is content-based hashing, not a URL fetcher: it never downloads anything, so the input needs to be the exact bytes that will actually be served, including whitespace and line endings, since any difference produces a completely different hash.
How to use SRI Hash Generator
- 1.Paste the exact script or stylesheet content you'll be serving, byte-for-byte.
- 2.Copy the integrity value for whichever algorithm your build tool or CDN already uses (SHA-384 is the common default).
- 3.Add it to the script or link tag's integrity attribute along with crossorigin="anonymous".
Frequently asked questions
Use via API, SDK, or MCP
cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/sri-hash-generator \
-H "Authorization: Bearer utx_live_..." \
-H "Content-Type: application/json" \
-d '{"content":"console.log(1)"}'Get an API key from your dashboard · Full API docs →