LinuxCommandLibrary

jwt

encodes and decodes JSON Web Tokens

TLDR

Decode JWT

$ jwt decode [token]
copy
Encode JWT
$ jwt encode --secret [secret] --payload '[{"sub":"user"}]'
copy
Decode without verification
$ jwt decode --no-verify [token]
copy
Show header
$ jwt decode --header [token]
copy
Encode with algorithm
$ jwt encode --alg [HS256] --secret [key] --payload '[{}]'
copy

SYNOPSIS

jwt command [options]

DESCRIPTION

jwt encodes and decodes JSON Web Tokens. It creates and verifies JWTs for authentication systems.
The tool supports various signing algorithms. It displays token contents for debugging.

PARAMETERS

decode TOKEN

Decode JWT token.
encode
Create JWT token.
--secret SECRET
Signing secret/key.
--payload JSON
Token payload.
--alg ALG
Signing algorithm.
--no-verify
Skip signature verification.
--help
Display help information.

CAVEATS

Multiple implementations exist. Security sensitive. Verify algorithms carefully.

HISTORY

jwt CLI tools provide command-line access to JSON Web Token encoding and decoding for testing and debugging.

SEE ALSO

openssl(1), jq(1), jose(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community