SRI Hash Generator
Secure your external assets. Enter a URL to generate a standard HTML tag with the integrity attribute.
Frequently Asked Questions
What is Subresource Integrity (SRI)?
SRI is a security feature that enables browsers to verify that resources they fetch (like
scripts or stylesheets) are delivered without unexpected manipulation. It works by allowing
you to provide a cryptographic hash that a fetched file must match.
Why should I use SRI?
Using SRI ensures that if a third-party server (like a CDN) is compromised, malicious code
cannot be injected into your site. If the file content changes and doesn't match your hash,
the browser will refuse to execute it.
What is a CORS error?
To generate a hash, this tool must fetch the file from the URL you provide. If the server
hosting the file doesn't have Cross-Origin Resource Sharing (CORS) headers enabled, the
browser blocks this tool from reading the file data for security reasons.
Which algorithm should I choose?
SHA-384 is widely used and provides a good balance of security and performance. SHA-512 is
stronger and also recommended. SHA-256 is the minimum requirement but considered less secure
for long-term standards.