Skip to content
browserutils

SRI Hash Generator

Generate Subresource Integrity hashes for scripts and stylesheets

SRI Hash Generator is a free online tool from BrowserUtils that generate subresource integrity hashes for scripts and stylesheets. It runs entirely in your browser — your data never leaves your device. No account required.

How to use SRI Hash Generator

  1. 1 Paste or type your input into the editor above.
  2. 2 The tool processes your data instantly — right in your browser, with nothing sent to a server.
  3. 3 Copy the result with one click or continue editing your input.

About SRI Hash Generator

Free online SRI hash generator. Create Subresource Integrity hashes (SHA-256, SHA-384, SHA-512) for script and stylesheet tags to protect against CDN tampering. This tool runs entirely in your browser — your data is never sent to a server. Just paste your input, get instant results, and copy with one click. No sign-up or installation required.

SRI Hash Generator specs

Runtime
100% client-side (browser)
Cost
Free — no account, no rate limits, no usage caps
Browser support
Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
Part of
299 developer tools on BrowserUtils (100% client-side)

Questions

What is Subresource Integrity (SRI)?
SRI is a security feature that allows browsers to verify that files fetched from CDNs or third-party servers have not been tampered with. You include a cryptographic hash in the integrity attribute of script or link tags, and the browser checks the downloaded file against that hash before executing it.
Which SRI hash algorithm should I use?
SHA-384 is the most commonly used and provides a good balance of security and compatibility. SHA-256 is also widely supported. SHA-512 offers the highest security but is less commonly seen. You can include multiple hashes for fallback compatibility.
How do I add an SRI hash to a script tag?
Add the integrity attribute to your script or link tag, like <script src="..." integrity="sha384-..." crossorigin="anonymous">. The crossorigin attribute is required for SRI to work with resources served from a different origin.
What happens if the SRI hash does not match the file?
The browser blocks the resource from loading entirely. This protects your users from executing tampered code, but it also means your page may break if the CDN serves an updated file. Always update your SRI hashes when you update the library version.
Does the SRI hash generator process my file locally?
Yes. The hash is computed entirely in your browser using the Web Crypto API. The file contents are never sent to any server.
Embed this tool

Copy this code to embed the tool on your website. Adjust the height to fit your layout.

<iframe src="https://www.browserutils.dev/embed/sri-hash-generator" width="100%" height="500" frameborder="0" title="SRI Hash Generator"></iframe>

Related tools

More Security & Privacy

View all Security & Privacy tools