CruxDevCruxDev Tools Prompts
security Utility • Zero-Server Privacy • 100% Client-Side

JWT Secret Brute-Force Checker

Test common weak secrets and custom wordlists against a JWT's HMAC signature to verify if a secret is guessable.

Overview

Tests an HS256 JWT's signature against a built-in list of twelve common secrets - secret, password, 123456, admin, jwtsecret and friends - computing real HMAC-SHA-256 signatures with Web Crypto and comparing them to the token's own signature. A hit means the signing secret is guessable and must be rotated; a miss means it survives the obvious dictionary.

How It Works

Paste the JWT - it must have three dot-separated parts - and press Test Common Secret Wordlist. The tool signs the header.payload string with each candidate secret via HMAC-SHA-256, base64url-encodes each signature, and compares against the token's third part. A match reports the compromised secret in red; no match reports that the secret resisted the dictionary, in green. All computation stays in the page.

Step-by-Step Usage Guide

  1. Copy the JWT you want to test - from your own dev environment, never a token you do not own.
  2. Paste it into the input box and press Test Common Secret Wordlist.
  3. If a match appears, treat the secret as compromised: rotate it immediately and invalidate outstanding tokens.
  4. On a miss, do not celebrate - run a real dictionary attack with proper tooling before calling a secret strong.

Technical Specifications & Standards

The mechanics are a faithful HS256 verification loop: split the token, hold out the first two segments as the signing input, import each candidate secret for HMAC-SHA-256 through crypto.subtle, sign, and compare the base64url result (plus-for-minus, slash-for-underscore, padding stripped, per RFC 7515) with the token's signature segment. The candidate list is twelve strings chosen for how often they appear in leaked configs and tutorials - secret, password, 123456, admin, jwtsecret, key, supersecret, private, test, token, 1234567890, default. Calibrate what both outcomes mean. A hit is unambiguous: the exact secret is one of those strings, so anyone with your token - or just its header, which is public - can forge arbitrary claims, and the fix is rotating to a secret with at least 256 bits of real randomness. A miss is weak evidence: twelve guesses is a smoke test, not a crack, and a proper offline attack runs billions of candidates per second. This tool only tests HS256 (symmetric) tokens; RS256 and ES256 signatures are verified with a public key, and there is no secret to guess. Use it in development to prove to yourself why jwtsecret is not a secret.

Targeted Use Cases

  • Auditing your own dev or staging tokens for the embarrassing secrets that tutorials seed by default.
  • Demonstrating to a team why HS256 secrets must come from a CSPRNG, not from a keyboard.
  • Verifying that a token you issued really was signed with the secret you think it was.
  • Learning the HS256 verification loop - import, sign, base64url, compare - with a concrete worked example.

Notes & Gotchas

  • Rotate immediately on a match, and invalidate existing tokens - a guessable HS256 secret means anyone can mint tokens for any user.
  • Generate signing secrets with a CSPRNG at 256 bits or more; a human-chosen or tutorial-default string is a liability regardless of length.
  • A miss here is not proof of strength - twelve guesses is a smoke test, not a brute-force campaign.
  • Test only tokens you own. Testing a token from a system you do not control is unauthorized security testing, whatever the outcome.

Frequently Asked Questions

Does a green result mean my secret is strong?

No. It means the secret is not one of twelve specific common strings. Real cracking tooling tests billions of candidates per second. A clean result here just rules out the laziest guesses.

Which tokens can this tool test?

Only HS256 tokens - JSON Web Tokens signed with HMAC-SHA-256 using a shared secret. RS256 and ES256 tokens are signed with a private key and verified with a public key; there is no secret to guess, so this approach does not apply.

Is my token sent anywhere?

No. The token and the candidate secrets never leave the page: the signatures are computed with the browser's Web Crypto and compared locally. Nothing is logged or transmitted.

Why twelve secrets and not a full wordlist?

A browser tool is the wrong place for a billion-candidate attack - the goal is a fast, honest smoke test that catches the defaults everyone actually ships. For real audits, use dedicated offline tooling against a proper wordlist on hardware built for it.