jwtd

command module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 10 Imported by: 0

README

jwtd

A CLI tool that decodes and pretty-prints JSON Web Tokens (JWTs) with syntax-highlighted JSON output.

Features

  • Decode any JWT and display its header, payload, and signature
  • Syntax-highlighted JSON output with a consistent color scheme
  • Automatic conversion of iat, exp, and nbf timestamps to human-readable RFC3339 dates
  • Accepts tokens as arguments, from stdin pipes, or via an interactive prompt
  • Colors auto-disable when output is not a TTY

Installation

Homebrew (macOS and Linux)
brew install webcodr/tap/jwtd
From source

Requires Go 1.26+.

go install github.com/webcodr/jwtd@latest
From releases

Download a prebuilt binary from the Releases page. Binaries are available for:

  • Linux (amd64, arm64)
  • macOS (amd64, arm64)
  • Windows (amd64, arm64)

Usage

Pass a token as an argument:

jwtd eyJhbGciOiJIUzI1NiIs...

Pipe a token from stdin:

echo eyJhbGciOiJIUzI1NiIs... | jwtd

Or run without arguments for an interactive prompt:

jwtd
Enter JWT: _

Output

jwtd prints three sections — Header, Payload, and Signature — with colored, indented JSON:

Element Color
Keys Bold blue
Strings Green
Numbers Yellow
Booleans Magenta
Null Red
Labels Bold cyan
Signature Dim

Development

Build
go build -o jwtd .
Test
go test -v ./...

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL