SRI Hash Generator
Browser Support
Check SRI on caniuse.com to see specific browser version support information.
To fully test your browser for subresource integrity support, please open this page.
Simply add the integrity attribute to your <script> or <link> tags to enable SRI protection.
How do I generate an integrity value?
🔐 What is Subresource Integrity (SRI)?
SRI is a W3C specification that allows web developers to ensure that resources hosted on third-party servers (such as libraries on CDNs) have not been tampered with. Simply add an integrity attribute to your <script> or <link> tags.
⚡ How does SRI differ from HTTPS?
HTTPS ensures data is not tampered with during transit, but cannot guarantee the resource provider itself is secure. SRI protects against compromised CDNs by verifying the file hash matches expectations.
🛡 CDN Security
Enter the URL of the resource, choose a hash algorithm (SHA-256, SHA-384, or SHA-512), and this tool will automatically fetch the resource and generate the corresponding integrity hash.
⚙ Why is the crossorigin attribute needed?
SRI requires resource requests to use CORS. Adding the crossorigin="anonymous" attribute tells the browser to request the resource anonymously, enabling SRI verification.