A fast, lightweight CLI tool to decode and inspect JWT tokens. Built with Bun.
curl -fsSL https://raw.githubusercontent.com/bsreeram08/jwt-cli/master/install.sh | bashDownload the appropriate binary for your platform from the releases page and place it in your PATH.
| Platform | Binary |
|---|---|
| macOS (Apple Silicon) | jwt-darwin-arm64 |
| macOS (Intel) | jwt-darwin-x64 |
| Linux (x64) | jwt-linux-x64 |
| Linux (ARM64) | jwt-linux-arm64 |
| Windows (x64) | jwt-windows-x64.exe |
git clone https://github.com/bsreeram08/jwt-cli.git
cd jwt-cli
bun link# Decode a JWT token
jwt <token>
# Show help
jwt --help
# Show version
jwt --version
# Check for updates
jwt --updatejwt eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cOutput:
━━━ Header ━━━
{
"alg": "HS256",
"typ": "JWT"
}
━━━ Payload ━━━
{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}
━━━ Timestamps ━━━
Issued At (iat): Thu, Jan 18, 2018 at 07:30:22 AM GMT+5:30 (7 years ago)
━━━ Status ━━━
✓ Token is valid (time-based)
━━━ Signature ━━━
Algorithm: HS256
Signature: SflKxwRJSMeKKF2QT4fwpMeJf36POk6y...
⚠ Signature verification requires the secret/key
- Decodes JWT header and payload with syntax highlighting
- Converts timestamps (
iat,exp,nbf) to human-readable format with relative time - Shows token validity status (expired, not yet valid)
- Displays time remaining until expiration
- Shows signature algorithm and truncated signature
- Cross-platform support (macOS, Linux, Windows)
- Zero dependencies - single binary
Requires Bun v1.0+
# Build for current platform
bun build jwt.ts --compile --outfile jwt
# Build for all platforms
./build.shMIT