Skip to main content
Bethemesh
Security & privacy

SRI hash generator

Create SHA-256, SHA-384 or SHA-512 SRI attributes locally for resources loaded from a CDN.

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

  • 100% local
  • Instant
  • Free
  • No account
  • Works offline
  • Clipboard

Source

Why use this tool?

Subresource Integrity lets browsers verify that a script or stylesheet downloaded from a CDN exactly matches the expected file. This tool computes the digest locally and prepares the required HTML attributes.

100% local and secure

Your data stays on your device and is never sent to our servers.

Smart processing

Generate or verify sensitive data with clear and immediate controls.

Supported formats

Strings, keys, hashes, and technical formats depending on the security function.

Save time

Get a clean, ready-to-use result in seconds without installing software or configuring a complex workflow.

Guide

How to use this tool

  1. 1

    Add the resource

    Paste file contents or select a JavaScript or CSS file from your device.

  2. 2

    Choose the algorithm

    SHA-384 is a common robust choice for external Web resources.

  3. 3

    Copy the tag

    Add the integrity and crossorigin attributes to your script or link tag.

Tips and best practices

  • Regenerate the hash whenever the remote file changes.
  • Ensure the CDN server supports CORS requests.
  • Prefer SHA-384 or SHA-512 for new integrations.

Frequently asked questions

What is SRI for?

SRI prevents the browser from executing an external resource when its content does not match the expected digest.

Is the file uploaded?

No. Web Crypto calculates the digest directly in your browser.

Why add crossorigin?

SRI checks for cross-origin resources generally require a CORS-compatible request.

Was this tool useful?

Recommended workflow

Continue your processing

Discover tools that naturally fit before, after, or alongside this one.

Complementary tools

Security & privacy

Hash generator

Generate a text hash using several common hashing algorithms.

100% local
Use this tool
Security & privacy

HMAC Generator & Verifier

Generate or verify SHA-256, SHA-384 and SHA-512 HMAC values locally.

100% localNew
Use this tool
Security & privacy

Hash comparator

Compare two hashes or checksums to immediately verify whether they match exactly.

100% local
Use this tool