Subresource Integrity Generator
Generate SHA-256, SHA-384, or SHA-512 integrity hashes and script or link tags with the Web Crypto API.
Generate Subresource Integrity hashes in the browser
Subresource Integrity (SRI) lets browsers verify that CDN scripts and stylesheets match the file you expected. Pair an integrity attribute with crossorigin="anonymous" on script and link tags so tampered files fail to execute.
Related developer tools
Hash text with the Checksum Calculator, build SPF records with the SPF Generator, and inspect TLS with the SSL Checker.
Frequently Asked Questions
Which hash algorithm should I use?
SHA-384 is a strong default. SHA-256 is widely supported, and SHA-512 offers maximum digest size.
Why is crossorigin required?
Browsers only enforce SRI on CORS-enabled requests. Use crossorigin="anonymous" unless the CDN requires credentials.
Can I hash a local file?
Yes. Upload a .js or .css file and the tool reads it locally before hashing.
Does content leave my device?
No. Hashing uses the Web Crypto API in your browser.