Create a Subresource Integrity hash for a script or stylesheet’s exact bytes.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Resource bytes are hashed with SHA-256, SHA-384, or SHA-512 and Base64 encoded into an integrity token; crossorigin is included when needed. Browsers compare fetched bytes to the digest before applying the resource.
console.log('Hello, World!');
# Subresource Integrity Hash Integrity: sha384-AbXMBJEf72gjQYPpnzblmu6EMIjgH7+GKr1dqa+zMcargkw+4UwBZhjbltwmSfcI # SHA-256: sha256-VrXiRzNabZlVUzrPKgON5EtG2BuRUP8wULVkbIOqqkA= # SHA-384: sha384-AbXMBJEf72gjQYPpnzblmu6EMIjgH7+GKr1dqa+zMcargkw+4UwBZhjbltwmSfcI # SHA-512: sha512-NPJXEZdKRVSg+mZDCNsuCXB4f8Rh3GOLcDlrR6mmDYeJVNgb9sgVc3We3eE5SNdIMzcK9PnrRKPschwvl45Ibg== # Script Tag <script src="URL" integrity="sha384-AbXMBJEf72gjQYPpnzblmu6EMIjgH7+GKr1dqa+zMcargkw+4UwBZhjbltwmSfcI" crossorigin="anonymous"></script> # Stylesheet Tag <link rel="stylesheet" href="URL" integrity="sha384-AbXMBJEf72gjQYPpnzblmu6EMIjgH7+GKr1dqa+zMcargkw+4UwBZhjbltwmSfcI" crossorigin="anonymous">
CDN scripts, build pipelines, and third-party asset reviews generate SRI.