Browser-Based Developer Security No Registration Required

SRI Hash Generator

Generate Subresource Integrity (SHA-256, SHA-384, SHA-512) Base64 digests and ready-to-use <script>/<link> tags.

Integrity Attribute Value

—

HTML Element Snippet

—

How SRI Hash Generator Works

Hashes pasted asset content or a selected local file via Web Crypto API (crypto.subtle.digest) and Base64-encodes the raw digest per the W3C Subresource Integrity specification.

Builds a copyable HTML <script> or <link> tag including integrity="..." and crossorigin="anonymous".

Step-by-Step Usage Instructions

  1. Paste the exact CSS/JS asset body or choose the local bundle file.
  2. Select SHA-384 (recommended) or SHA-256/SHA-512 and optionally enter the CDN URL.
  3. Copy the integrity attribute or complete HTML tag into your layout.

Practical Examples

Script Integrity Attribute

Sample Input

console.log("prohacker");

Expected Result

sha384-... + <script src="..." integrity="sha384-..." crossorigin="anonymous"></script>

Frequently Asked Questions

SHA-384 is the standard industry baseline for Subresource Integrity, balancing strong collision resistance and compact attribute length.

Keep Exploring

Related Cybersecurity Tools

Browse All Tools →
Browser-Based Free

Developer Security

Hash Generator

Compute SHA-256, SHA-384, and SHA-512 cryptographic digests for text and local files via the Web Crypto API.