Subresource integrity generator
Compute an SRI hash for pasted file content and build the matching script or link tag.
Subresource integrity generator
Paste the exact content of a script or stylesheet and this tool computes its Subresource Integrity (SRI) hash, then assembles a ready-to-use <script> or <link> tag around it. SRI lets a browser verify that a file loaded from a CDN or another origin has not been tampered with — the browser refuses to run it if the fetched bytes don't match the hash you provide.
Choose SHA-256, SHA-384 or SHA-512, or tick more than one box to produce a combined integrity value listing several algorithms at once — a browser picks the strongest one it supports. Pick the tag type (script or link), fill in the source URL, and set the crossorigin value your CDN expects (anonymous is correct for almost every public CDN). For a script tag you can also add defer or async. Switch the output to "integrity value only" when you just need the attribute value to paste into markup you already have.
The hash is computed on the exact bytes you paste, including whatever line endings the file was saved with — a browser checks a resource's real bytes, so normalizing them here would produce a hash that no longer matches the actual file. Very large files are supported up to the tool's usual size limit.
Everything happens locally in your browser: the content you paste is never uploaded anywhere, which matters since it's often the exact source of a script you're about to publish. Copy the result, download it as a .txt file, or clear the fields and start over.