jwtop is a comprehensive command-line interface (CLI) and Go library designed to facilitate all aspects of JSON Web Token (JWT) operations. It enables users to decode, verify, create, sign, crack, and exploit JWTs, providing a robust toolkit for developers, security professionals, and researchers.
Key Features:
Decode and Verify: Decode JWTs and verify their signatures using HMAC, RSA, ECDSA, or JWKS.
Create and Sign Tokens: Generate new tokens and sign them with various algorithms (HS256, RS256, ES256).
Re-sign Tokens: Modify and re-sign existing tokens to alter claims or switch algorithms.
Security Testing: Exploit common JWT vulnerabilities such as alg=none bypass, blank secret injection, null signature, HMAC confusion, kid injection, and more.
Server Vulnerability Probing: Automatically test a target URL for known JWT security flaws using built-in exploit techniques.
Dictionary Attacks: Crack HMAC secrets using predefined or custom wordlists.
Audience & Benefit:
Ideal for developers working with JWTs to streamline token management, security professionals to identify and exploit vulnerabilities in web applications, and researchers to conduct ethical hacking and penetration testing. jwtop provides a powerful yet user-friendly toolset to enhance application security by uncovering potential flaws in JWT implementations.
jwtop can be installed via winget for ease of use, ensuring developers have quick access to this essential toolkit.
README
JWTop
A fast, developer-friendly JWT operations toolkit — decode, verify, create, sign, crack, and exploit JSON Web Tokens.
JWTop is a Go library and CLI for working with JSON Web Tokens. It covers the full JWT lifecycle: decoding, verifying, creating, and signing tokens — plus a security-testing layer for probing and exploiting common JWT vulnerabilities.
CLI — decode, verify, create, sign, crack, and exploit tokens from the terminal
Library — composable Go packages for each operation, designed for direct integration
Security testing — built-in exploit primitives (alg=none, HMAC confusion, kid injection, blank secret, null signature) and a server vulnerability scanner
> Disclaimer: The exploit and crack functionality is intended for authorised security testing, penetration testing, CTF competitions, and educational purposes only. Never test systems you do not own or have explicit written permission to test.
git clone https://github.com/cerberauth/jwtop.git
cd jwtop
go build -o jwtop .
Library
Install only the packages you need:
# Core operations (decode, verify, create, sign)
go get github.com/cerberauth/jwtop/jwt
# Token editor (re-sign and mutate existing tokens)
go get github.com/cerberauth/jwtop/jwt/editor
# Security exploit primitives
go get github.com/cerberauth/jwtop/jwt/exploit
# Server vulnerability prober
go get github.com/cerberauth/jwtop/jwt/crack
CLI Usage
jwtop [command] [flags]
Commands:
decode Decode and pretty-print a JWT
verify Verify a JWT signature
create Create and sign a new JWT
sign Re-sign an existing JWT
crack Probe a server for JWT vulnerabilities
exploit Apply a known exploit to a JWT
version Print version information
decode
Decode and pretty-print a JWT without verifying the signature.
Probe a target URL with every known JWT exploit technique and report which ones the server accepts. Each technique produces a modified token sent as Authorization: Bearer . A response matching --expected-status marks that technique VULNERABLE.