Free · no signup · browser-local

SRI Integrity Hash Generator for Local Files and Text

Compute SHA-256, SHA-384 or SHA-512 Subresource Integrity values from a local file or text. Build an escaped script or stylesheet snippet without fetching its URL.

Browse all tools →

Input & options

LOCAL

SRI checks exact resource bytes, not author trust. Cross-origin servers must allow CORS; snippets include crossorigin="anonymous".

Result

Choose inputs and run the tool to see the result.

Getting started

Select text or a local file, choose SHA-256/384/512 and generate. A URL is used only as snippet text and is never fetched.

Before you use the result

Maximum file size: 25 MB. SRI must match the exact deployed resource bytes; cross-origin resources require suitable CORS headers. A hash does not establish author trust.

Try an example

SHA-256 of UTF-8 text “abc” produces sha256-ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=.

How it works

WebCrypto digests the exact input bytes, encodes the digest as base64 and prefixes sha256-, sha384- or sha512-. Script/link attributes are escaped and include crossorigin="anonymous".

Frequently asked questions

Hash a local file or exact UTF-8 text into an SRI integrity token and escaped HTML snippet.

How do I use Subresource Integrity Generator?

Select text or a local file, choose SHA-256/384/512 and generate. A URL is used only as snippet text and is never fetched.

Does this tool upload my data?

Inputs and files are processed in your browser. Page-view analytics do not contain your tool input.

What should I check before using the result?

Maximum file size: 25 MB. SRI must match the exact deployed resource bytes; cross-origin resources require suitable CORS headers. A hash does not establish author trust.