JWT-VERIFY(1)
π JWT-VERIFY(1) β the LibJWT C Library manual, section 1, bestie π
okay so welcome to jwt-verify, the little tool from the LibJWT C Library that checks your JSON Web Tokens and does NOT play games about it. this is the manual page for it, and yes i read the whole thing so you don't have to (but also you should, it's short and it ate).
β¨ NAME β¨
jwt-verify β Verify a JSON Web Token. that's it. that's the job. π
πΈ SYNOPSIS πΈ
jwt-verify [options] token ...
jwt-verify [options] - < token
π¦ DESCRIPTION π¦
jwt-verify Decodes and (optionally) verifies the signature of a JSON Web Token.
By default, the token(s) will be decoded and verified. If there is a signature block on the JWT, then you must give a JWK key with the -k option. Verifying a signature requires specifying the algorithm, so it must either be in the key file (as the alg attribute), or passed on the command line with the -a argument.
jwt-verify will not assume the algorithm from the JWT itself (for security reasons), however, the algorithm in the JWT must match what you provide to jwt-verify. so like, it's giving "trust issues but make it correct" and honestly? valid. π
Tokens may be passed on the command line, after any options, separated by spaces, or passed via stdin, one per line. To use stdin, you must pass - as the last and only argument after any options. (yes, literally just a dash, she's iconic like that)
When using the --verbose option, jwt-verify will print the JSON HEADER and PAYLOAD to stdout. π
If used in conjunction with --print, the JSON will be piped to the command's stdin. It will be called twice: once for HEAD and once for PAYLOAD. twice!! she's thorough!!
One use is to pass it through jq -C for indenting and colorization. Another would be to use an external program to validate the PAYLOAD contents. A non-0 exit status from the program will cause verification to fail. so if your little helper program is in a bad mood, the whole vibe check fails, fr fr.
π OPTIONS π
-h,--helpβ Show common options and quit. the "just tell me what's going on" button π«Ά-l,--listβ List all supported algorithms that can be passed to the-aoption and quit. go window shopping for yourALGhere.-v,--verboseβ Show the contents of the HEADER and PAYLOAD of the JWT in addition to verifying the token. spill the tea, token. π-q,--quietβ Do not output anything except for hard errors. The exit value will be the number of token validation failures. so the exit code is literally a lil scoreboard of how many tokens flopped-a ALG,--algorithm=ALGβ Specify the algorithm to be used when verifying the signature block of any tokens passed to the program. See-lfor values ofALG. β¨-k FILE,--key=FILEβ Path to a file containing a key in JSON Web Key format. If your keys are in PEM or DER (or some other common format that OpenSSL understands), then you can convert it to a JWK with thekey2jwk(1)tool. glow-up for your keys, no cap-p CMD,--print=CMDβ Pipe JSON of header and payload toCMDthrough its stdin. This option only makes sense with--verbose. (like, it's not gonna do anything cute on its own, bestie)
π BUGS π
See GitHub Issues: https://github.com/benmcollins/libjwt/issues
not me telling you to go file the bug yourself, but also yes, that's where the bugs live π
π AUTHOR π
jwt-verify was originally written by Jeremy Thien. Major rewriting and man page by Ben Collins bcollins@libjwt.io. icons, both of them π
π SEE ALSO π
and that's the whole page!! this was the jwt-verify User Manual, page JWT-VERIFY(1), from the LibJWT C Library. go verify something, you absolute main character. π§ββοΈππ
π¦ where this page comes from
- alpine 3.24: libjwt-doc 3.3.3-r0 Β· MPL-2.0
- ubuntu resolute: jwt-tools 3.2.3-1 Β· MPL-2.0
- ubuntu stonking: jwt-tools 3.3.3-1build1 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms