Decode JWTs
Pretty-print exact JSON values and human-readable token timestamps.
JWT / JWS / JWE inspection
jwtd decodes JSON web tokens, verifies signatures, and decrypts encrypted payloads without leaving your terminal.
brew install webcodr/tap/jwtd
$ jwtd eyJhbGciOiJSUzI1NiIs...
Header:
{
"alg": "RS256",
"typ": "JWT"
}
Payload:
{
"sub": "user_2048",
"admin": true,
"iat": 1784689200,
"note": null
}
Signature: eyJfX2p3dGRfXyI...
01 / capabilities
Inspect first. Add a key only when cryptographic proof or plaintext is needed.
Pretty-print exact JSON values and human-readable token timestamps.
Check the cryptographic signature independently from claim expiry.
Detect compact JWEs and reveal protected content with the supplied key.
Recursively inspect JWT-inside-JWE and JWE-inside-JWE payloads.
Use PEM, DER, certificates, JWK Sets, encoded material, or raw secrets.
02 / installation
The suggested method follows your operating system when JavaScript is available. Every method remains below when it is not.
macOS / Linux
Installs the current release from the webcodr tap.
brew install webcodr/tap/jwtd
Windows
Add the bucket once, then install jwtd.
scoop bucket add webcodr https://github.com/webcodr/scoop-bucket
scoop install jwtd
Linux / choose package and architecture
Download the matching release asset. Distro and CPU architecture are intentionally not guessed.
Go 1.26+
Build the latest tagged version with your Go toolchain.
go install github.com/webcodr/jwtd@latestLinux / macOS / Windows
Choose amd64 or arm64 for your platform, verify it, and place the binary on your path.
03 / usage
Tokens can arrive as an argument, through stdin, or at the interactive prompt.
Inspect the header, claims, and signature without requiring a key.
jwtd eyJhbGciOiJIUzI1NiIs...A failed signature prints INVALID and exits nonzero. Claim expiry is not part of this cryptographic check.
jwtd --key /path/to/public-key.pem eyJhbGciOiJSUzI1NiIs...Five-part compact tokens are detected automatically; provide the private key to reveal the payload.
jwtd --key /path/to/private-key.pem eyJhbGciOiJSU0EtT0FF...04 / key formats
The --key flag and JWTD_KEY environment variable share the same format detection path.
Explicit HMAC secret
jwtd --key raw:my-hmac-secret eyJhbGciOiJIUzI1NiIs...05 / release security
Every archive and Linux package is covered by checksums.txt. The checksum file carries a keyless Cosign bundle tied to this repository's release workflow, and every archive ships with a Syft SPDX SBOM.
Verify the signed checksum file
cosign verify-blob \
--bundle checksums.txt.sigstore.json \
--certificate-identity-regexp '^https://github.com/webcodr/jwtd/\.github/workflows/release\.yml@' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
checksums.txt