CSP Nonce and Hash Generator

Your workspaceProcessed on your device

Use the contents inside the script or style tags. Pasted text uses UTF-8 with browser-normalized line breaks. File mode hashes every supplied byte.

A few things to know.

Hashes up to 1,000,000 bytes with Web Crypto. Pasted text is UTF-8 with browser-normalized line endings. Each hash line is a source example to integrate into an existing policy.

  1. Choose Inline hash sources or Fresh nonce.
  2. For hashes, choose script-src or style-src and enter the content between the element tags. Select Exact file bytes to preserve the source file as read.
  3. Generate and copy or download the result. For a real nonce-based policy, generate a fresh nonce for every response at the server.