SRI Hash Generator

Browser Support

Chrome45+
Firefox43+
Safari11+
Edge17+
Opera32+
Your browser supports SRI ✓

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.