jwtd

webcodr·WebCodr.jwtd

Decode and pretty-print JSON Web Tokens with syntax highlighting

jwtd is a command-line tool that decodes and pretty-prints JSON Web Tokens (JWT) and JSON Web Encryption (JWE) tokens with syntax-highlighted JSON output. It can verify JWS signatures and decrypt JWEs when given a key via the --key flag or the JWTD_KEY environment variable.

winget install --id WebCodr.jwtd --exact --source winget

Latest 5.11.0·December 2, 2026

Release Notes

Diffing, SD-JWTs, JSON Serialization, and batch mode

This release adds four ways to work with tokens:compare two tokens semantically, decode Selective Disclosure JWTs, read JWS and JWE tokens in JSON Serialization, and process many tokens in one run. It also includes the fixes from a security audit of these features.

What's new

jwtd diff. jwtd diff <tokenA> <tokenB> compares two tokens field by field instead of as text.

• Output: added (+), removed (-), and changed (~) header and payload fields. --all also shows unchanged fields. • Timestamps: iat, exp, nbf, auth_time, and updated_at show signed deltas such as (+1h). The --local/--tz timezone flags apply. • Keys: --key and --verify-key apply to both tokens. A JWK Set verifies tokens across kid rotations, and encrypted or nested tokens are decrypted before they are compared. • Scripting: --exit-code exits 1 when the tokens differ. --json emits a machine-readable diff. - reads one of the two tokens from stdin. • Fails closed: two undecrypted JWEs with different ciphertexts are never reported equal. An SD-JWT whose disclosures do not bind never compares equal to anything.

SD-JWT (RFC 9901). Tilde-separated Selective Disclosure JWTs are detected automatically.

• Disclosures: every disclosure is checked against its digest, recursively and inside arrays, with sha-256, sha-384, or sha-512. The disclosed claims are merged into the payload. A tampered, duplicated, conflicting, or unreferenced disclosure fails with a nonzero exit. • Key Binding JWTs are checked for typ, an asymmetric alg, the required claims with their types, and sd_hash. Their signature is verified against cnf.jwk only after the issuer signature verified against your --key, because a holder key the issuer did not vouch for proves nothing. • Works everywhere: claim validation, --claim/--payload, --json, nesting inside a JWE, and jwtd diff all use the reconstructed claims.

JWS and JWE JSON Serialization. Flattened and General JSON Serialization (RFC 7515 / RFC 7516 §7.2) is detected alongside compact tokens. Pretty-printed JSON can be piped in as is.

• JWS: protected and unprotected headers are shown, and every signature is verified on its own. In a multi-signature token, a signature your key does not apply to is reported as not checked instead of INVALID, so one signer's key can verify that signer's signature. • JWE: the shared and per-recipient headers and the AAD are shown. Multi-recipient tokens are decrypted using each recipient's kid and alg. • Raw JWS payloads: a compact JWS carrying a non-JSON payload now decodes, verifies, and extracts with --payload. Claim checks and --claim fail on it, because it holds no claims.

--stream. Process newline-delimited tokens from stdin, for example from logs.

• Output: human output separates tokens with ---. --json emits NDJSON. --claim extracts one value per valid token. • Errors: processing continues past bad lines. Errors and verdicts on stderr name the line they came from. The exit status is nonzero at the end if any token failed. • Interactive: on a terminal, jwtd --stream prompts in a loop until an empty line, exit, or Ctrl+D.

Behaviour changes

• JWS extensions are refused. jwtd implements no JWS extension, so a token whose header carries crit is rejected, as RFC 7515 §4.1.11 requires. So is an RFC 7797 unencoded payload ("b64":false). Before, such a token's payload was base64url-decoded like any other, so a payload the issuer never signed could verify VALID. • Tokens nested in a JWE must be clean. A decrypted payload opens as a nested token only when it contains nothing but token characters; surrounding whitespace is trimmed. A line break inside a segment used to parse and reach the terminal raw. Such a payload is now shown as text. • Deep nesting is indented less. Indentation stops growing at 64 levels in both the regular and the diff output. Deeper content is still printed in full. A 40 KB token nested 5,000 levels deep used to print 50 MB; it now prints 1.3 MB. • Verdict reasons are always escaped. Every reason printed after a verdict goes through the terminal escaper, so token-supplied text cannot forge a verdict line.

What's Changed

• docs:clear release notes after 5.10.0 by @bsg62 in https://github.com/webcodr/jwtd/pull/45 • feat:add jwtd diff subcommand for semantic token diffing by @bsg62 in https://github.com/webcodr/jwtd/pull/46 • feat:add RFC 9901 SD-JWT decoding, verification, and key binding support by @bsg62 in https://github.com/webcodr/jwtd/pull/47 • feat:support JWS/JWE JSON Serialization and raw non-JSON JWS payloads by @bsg62 in https://github.com/webcodr/jwtd/pull/48 • feat:add --stream mode for newline-delimited batch decoding and interactive loops by @bsg62 in https://github.com/webcodr/jwtd/pull/49 • fix:address security audit findings H1–H5, M2–M4 by @bsg62 in https://github.com/webcodr/jwtd/pull/50 • fix:address remaining security audit findings M1, M5, L1–L6 by @bsg62 in https://github.com/webcodr/jwtd/pull/51 • docs:add 2026-12-01 security audit with resolution status by @bsg62 in https://github.com/webcodr/jwtd/pull/52 • docs:draft release notes and update agents file lists by @bsg62 in https://github.com/webcodr/jwtd/pull/53 • docs:prepare 5.11.0 website by @bsg62 in https://github.com/webcodr/jwtd/pull/54

Full Changelog:https://github.com/webcodr/jwtd/compare/v5.10.0...v5.11.0

Installer type: zip

x64—6324E3A3157C9922E2B2597B56A12F9C019BB6604A160291173D096DFD8DF3F2
arm64—13E7BC7253824A4BF784A00DC26E7DFD6A7901C7CA2B0CDB33EFD57761206783

Details

Homepage
https://github.com/webcodr/jwtd
License
MIT
Publisher
webcodr
Support
https://github.com/webcodr/jwtd/issues
Copyright
Copyright (c) David Henning
Moniker
jwtd

Tags

clicommand-linecommand-line-tooljwejwtjwt-decodejwt-decoderjwt-token

Older versions (7)

5.10.0
x64—2329B16082C358853815CBE1B24A4C5A1BE0D5A80FAA273FBD5AC124D2D0C624
arm64—7EB61CD57297BF0317270725DC76980B114471058C2F8ECEAA61DF8C19415AD8
5.9.0
x64—87202AAE3890B015D6608115237944630392F512FEEED5310DEDCA643DCBD4CD
arm64—24E076D916630DC29DC913C3237AB5D7991DDF6CEEE57F7827823B4EE1F1E292
5.7.1
x64—FAA76E5AF0AFE6A7DF38DB2FD967B1EF46AD460106C5E0627F27CA89B75AC74A
arm64—DE44CAB1393767605CC1742966DD2DC7E4A00970156D2CDAD0F0CE9C0AF8CCBE
5.7.0
x64—4C8FD855A613E90CC601D904B30A9EF8CA75130A620D86855CEF4595EEBCAF4B
arm64—16D8A31007DE27244E197C95FBF7EF2261740CD2066D4B2BA815DD21CDA7F700
5.6.0
x64—EEB79B01FE7275F94A4C5205708077612F81D522EEA76085846A185842260971
arm64—5738DB348B94A5412ABB73DBD962266F32D4E5B5F986F7517838C01A3BB41466
5.3.0
x64—F47B0660C12B6078BAB4EBAA53856744EA15B84951204F7748D1BCCFCAD32509
arm64—3E767347AEFC3AC349FFFAF81825F7AB3C95BE2EBB22679E6EA878B2F94DBD98
5.2.0
x64—1FE8F3AA854CBE64C7ECEDFCF2B5583C6E3B6CC7BC059767EED1BFE14A8EDE59
arm64—3920AD0534DAD2033AD1BCBD03BC9BAEC1491A1BBA6DF6764439D10CAC726489