Skip to main content

Secret Entropy Checker

Paste any API key, JWT secret, token, or env variable to check if it has enough entropy to be cryptographically secure. Everything runs in your browser — your secrets are never transmitted.

✓ Shannon & raw entropy calculation ✓ NIST recommendations ✓ Secret never leaves browser
Format:
Paste a secret above to analyze it.

Frequently Asked Questions

How much entropy does an API key need?▼

For general API keys and secrets: at least 128 bits of entropy (roughly 22+ random Base64 characters, or 32 hex characters). For symmetric encryption keys (AES-256): exactly 256 bits. For HMAC secrets (JWT HS256): at least 256 bits per NIST SP 800-107 recommendation.

What is Shannon entropy?▼

Shannon entropy measures the unpredictability in a string. It's calculated per-character as H = -Σ p(c) × log₂(p(c)). For a string with total entropy bits = length × H, higher means harder to guess. A fully random Base64 string has ~6 bits/char; a string like 'aaaaaaa' has 0 bits/char.

Is high entropy enough for a secure secret?▼

High entropy is necessary but not sufficient. The secret must also be generated by a cryptographically secure random number generator (CSPRNG), not derived from a timestamp, username, or any predictable input. Use crypto.randomBytes() in Node.js, secrets.token_bytes() in Python, or /dev/urandom.

What is the difference between raw bits and effective bits?▼

Raw bits = length × log₂(charset_size) — assumes all characters drawn randomly. Effective (Shannon) entropy = actual observed randomness, penalizing repetition and patterns. A good secret should have effective entropy close to its raw bit estimate.

What format should I use for secrets?▼

Hex (0-9, a-f): 4 bits/char — easy to read but less dense. Base64 (a-z, A-Z, 0-9, +, /): ~6 bits/char — more compact, 43 chars = 256 bits. URL-safe Base64: same density, safe in headers/URLs. For most uses: generate 32 random bytes and encode as hex (64 chars) or Base64 (43 chars).

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

OpenAPI Validator API Response Mock Generator API Response Time Tester OpenAPI Schema Validator OAuth2 Flow Visualizer OpenAPI Mock Generator OAuth2 Flow Debugger API Test Case Generator API Request Builder HTTP Security Headers Generator OAuth2 Flow Tester API Mock Server Config Generator HTTP Security Headers Checker authentik API Rate Limit Calculator API Response Formatter & Analyzer HTTP API Tester LLM Cost Calculator AI Prompt Cost Calculator REST API Request Builder Content Security Policy Builder LLM Prompt Cost Calculator API Response Mocker HTTP Header Inspector AI Rate Limit Calculator Prompt Injection Tester GCP Service Account Key Auditor HTTP Headers Analyzer API Key Generator AI Doc Generator — Pro Tool AI System Guardian Docker Compose Generator .htaccess Generator HTTP Methods Reference HTTP Code Snippet Generator HTTP Status Code Reference HTTP Status Code Reference JSON Diff Viewer JSON Diff nginx Config Generator Password Strength Checker Dockerfile Generator Rate Limiter Tester API Changelog Generator HTTP Mock Response Builder HMAC Generator CSP Header Builder Rate Limit Calculator CORS Policy Builder AWS IAM Policy Validator HTTP Cookie Parser SBOM Generator HTTP Status Code Lookup TOTP Code Generator HTTP Status Code Lookup Vue Component Generator HTTP Status Code Reference CI/CD Pipeline Generator LLM Context Window Calculator HTTP Header Analyzer LLM Token Counter Dockerfile Linter mTLS Certificate Chain Builder Prompt Token Estimator Mock Service Worker (MSW) API Mocking Guide Pulumi Modern IaC Guide HashiCorp Vault Secrets Management Guide AES Encryptor / Decryptor Casdoor Kubernetes Resource Calculator Docker Layer Optimizer HTML5 Canvas API Playground Token Context Calculator GraphQL Client Configurator Axios Interceptor Builder OpenAI Function Calling Generator Token Counter & Cost Estimator AI API Rate Limit Calculator Password Strength Analyzer

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →