SRI Hash Generator
Generate a Subresource Integrity SHA-2 token for exact pasted UTF-8 JavaScript or CSS contents.
Loading tool…
How to use SRI Hash Generator
Build an integrity attribute token from resource text you already have. The output combines the standard algorithm label and Base64 digest; no resource URL is fetched.
- Paste exact UTF-8 resource contents and select SHA-256, SHA-384, or SHA-512.
- Select Run tool to generate an integrity attribute token.
- Review the result, then copy it or download the generated file.
Good to know
- Text resources only, up to 200,000 characters. Pasting can alter encoding or line endings; the token must match the actual resource bytes.
- The token alone does not configure an HTML tag, CORS, or trust in the original source. Verify deployment behavior with the exact served file.
Common questions
Can I paste the resource URL?
No. A URL string would be hashed as text. Paste the file contents; this tool never downloads a resource.
Keep going with related tools
All developer →SHA Hash Generator
Calculate SHA-256, SHA-384, or SHA-512 digests of exact UTF-8 text using Web Crypto.
DeveloperCSP Policy Builder
Build a conservative Content-Security-Policy response header using exact HTTPS source origins.
DeveloperHTML Subresource Integrity Bundle Builder
Pair local HTML with exact JS and CSS file bytes, then download a source-preserving integrity-tagged HTML and asset bundle.
DeveloperInline CSP Hash Source Builder
Extract selected inline HTML script and style text, then export exact UTF-8 hash sources with parsed-content evidence.
DeveloperDNSSEC DS Record Builder
Calculate SHA-256 or SHA-384 DS records from a public DNSKEY field, with canonical DNS owner bytes and a key tag.
DeveloperNpm Dependency and Lock Metadata Inspector
Compare package.json dependency declarations with an npm lockfile and inspect repeated versions and install-script metadata.