A CLI tool for working with JSON Web Tokens. Decode any JWT to inspect its header and payload without needing the secret. Supports token validation and custom payload encoding. Uses base64url decoding for inspection and supports HMAC-SHA256 signing for encoding. Useful for debugging auth flows and testing API authentication.
SecurityAuthJWTCLI
Features
- Decode any JWT without a secret to inspect header/payload
- Encode new JWTs with HMAC-SHA256 signing
- Full token inspection with header, payload, and signature info
- Input from command line or file
Flags
| Long | Short | Description |
|---|---|---|
| --version | -V | Show version and license |
| --decode | -d | Decode a JWT token |
| --encode | -e | Encode a payload JSON into a JWT |
| --secret | -s | Secret key for signing/validation |
| --inspect | -i | Show header, payload, and signature info |
Usage
terminal
$ jwt --decode 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
$
$ jwt --inspect token.jwt
$
$ jwt --encode payload.json --secret mysecret
Dependencies
Bun runtime — uses built-in Buffer and crypto modules
Install
$ curl -LO https://labs.stech-sol.com/downloads/jwt/0.1.0/jwt_linux_amd64
$ chmod +x jwt_linux_amd64
$ # Requires Bun runtime: bun run ./jwt_linux_amd64
About
Downloads
Verify integrity
SHA256 checksums