← All free tools

SRI hash generator

Generate Subresource Integrity hashes for scripts and stylesheets. Hashes are computed locally with the Web Crypto API — nothing you type or upload leaves this page.

Tip: pasted text is hashed as UTF-8. If the file's bytes matter exactly (different encoding, trailing newline), pick the file instead.

Prefer the terminal?

The same sha384 digest with curl and openssl:

What is Subresource Integrity?

Subresource Integrity (SRI) is a browser security feature that lets you pin a script or stylesheet to a specific cryptographic hash. You add an integrity attribute to the <script> or <link> tag, and the browser refuses to execute the file if its contents don't match the hash — byte for byte.

Why pin third-party scripts?

Every third-party script you load runs with full access to your page: it can read forms, cookies, and anything your visitors type. If the CDN or vendor serving it is compromised — as in the many "supply-chain" attacks that have skimmed payment details from major sites — the attacker's code runs on your pages with your users. SRI turns that silent swap into a hard failure: the tampered file simply doesn't load. Pair it with crossorigin="anonymous" so the browser can verify cross-origin files, and remember to update the hash whenever you intentionally upgrade the file.

Tracely takes this seriously for its own tracker: the hosted snippet supports SRI out of the box, so you can pin the exact analytics script your visitors run. See the features page for how the tracker is built privacy-first from the ground up.