free security tools
← Back to tools

CSP Hash Generator

Generate SHA-256, SHA-384, and SHA-512 hashes for inline scripts and styles. Use these hashes in your script-src or style-src CSP directives to allow specific inline code without 'unsafe-inline'. Click any hash to copy it.

Generated Hashes

Paste content above to generate hashes
Usage example in CSP:
Content-Security-Policy: script-src 'sha256-abc123...' 'strict-dynamic'; style-src 'sha256-def456...'