Skip to main content
Back to Tools
Web Tools

SRI Hash Generator

Generate Subresource Integrity (SRI) hashes for scripts and stylesheets. Supports SHA-256, SHA-384, and SHA-512 algorithms. Outputs integrity attributes and complete HTML tags. Runs entirely in your browser — your data never leaves your machine.

sri subresource-integrity hash security csp cdn

Published May 31, 2026

All interactive tools run entirely in your browser. Your data never leaves your device.

How It Works

Paste the content of a script or stylesheet, and the tool computes a cryptographic hash using SHA-256, SHA-384, or SHA-512. The resulting integrity attribute can be added to <script> or <link> tags to ensure browsers only execute resources that match the expected hash.

Features

  • Three algorithms: SHA-256, SHA-384, SHA-512 — all computed client-side
  • HTML tag output: generates complete <script> or <link> tags with integrity
  • Crossorigin support: anonymous or use-credentials modes
  • Hex digest: shows the raw hex hash alongside the base64 integrity value
  • Content size: displays byte count of the input content
  • 5 examples: jQuery CDN, Bootstrap CSS, SHA-256, SHA-512, inline script
  • Private: all computation runs in your browser — no data transmitted

Use Cases

  • Adding SRI attributes to CDN-hosted scripts and stylesheets
  • Verifying file integrity before deployment
  • Content Security Policy (CSP) compliance with SRI
  • Auditing third-party resource integrity