Mastering JWTs: A Step-by-Step Tutorial to jwudtool
Happy debugging! This tutorial is for educational purposes only. Only test tokens you own or have permission to analyze.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c Run:
💡 Tip: Use --pretty for colorized output. If you have the secret key ( mysecret ): jwudtool tutorial
jwudtool version # Output: jwudtool 0.2.0 | Command | Purpose | |---------|---------| | decode | Decode header + payload without verifying signature | | verify | Check signature using a secret or public key | | forge | Create a new token from an existing one (change claims) | | fuzz | Test token against common attacks | Tutorial: Decode a JWT Given this sample token:
✗ Signature mismatch For RS256 tokens, use a public key:
✓ Signature valid If invalid:
go install github.com/youruser/jwudtool@latest Got a feature request or found a bug? Open an issue on GitHub .
"sub": "1234567890", "name": "John Doe", "iat": 1516239022
jwudtool verify --pubkey public.pem <token> Need to change a claim for testing? Clone and modify: Mastering JWTs: A Step-by-Step Tutorial to jwudtool Happy
"alg": "HS256", "typ": "JWT"
PAYLOAD:
jwudtool verify --secret mysecret <token> Expected output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9