Code tool

SRI Hash Generator

Create a SHA-256, SHA-384, or SHA-512 Base64 SRI token and a ready HTML integrity attribute value.

In-browser processingNo account requiredPrivacy details ↗

Up to 1 MiB of UTF-8 text. Processing stays in your browser; URLs and files are not fetched.

Paste text to generate an SRI hash.

Use the exact resource bytes in production. This tool hashes pasted text only and does not verify a fetched resource.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste the exact text content to hash.
  2. Choose SHA-256, SHA-384, or SHA-512.
  3. Generate and copy the SRI token or integrity attribute value.

Text input, browser-local hashing

This tool hashes the exact UTF-8 bytes of text you paste. It does not fetch a URL, read a local file, or upload your input.

SRI metadata format

The result follows the algorithm-Base64Digest format used by HTML integrity metadata. Choose the same exact resource bytes when generating a production integrity value; text line endings and encoding affect the digest.

Supported algorithms

Generate SHA-256, SHA-384, or SHA-512 metadata with the browser Web Crypto API. The HTML attribute output is the value for integrity="…" and does not include surrounding HTML markup.

GOOD TO KNOW

Common questions

Can I enter a resource URL?

No. Paste the resource text itself. The page does not fetch URLs or inspect files.

Is my input uploaded?

No. Hashing runs locally in your browser with the Web Crypto API.

Why can line endings change the result?

The hash uses the exact UTF-8 bytes produced from the pasted text. A newline or encoding difference changes those bytes and the digest.