- π Easy JWT Decoding: Decode JWT tokens with a simple command
- π¨ Beautiful Output: Color-coded and formatted JSON output
- β° Timestamp Display: Human-readable expiration and issuance dates
- π Flexible Viewing: View header, payload, or both separately
- π Fast & Lightweight: Built in Rust for optimal performance
- π οΈ Cross-platform: Works on macOS, Linux, and Windows
- Rust (1.86.0 or later)
- Clone the repository:
git clone https://github.com/Execute-Soft/jpeek.git
cd jpeek- Build and install:
cargo install --path .The jpeek command will be available globally in your system.
cargo build --release
./target/release/jpeek --helpcargo build --release
cp target/release/jpeek /usr/local/bin/# Decode a JWT token
jpeek -t "your.jwt.token.here"
# Or use the decode subcommand
jpeek decode -t "your.jwt.token.here"# Show only the payload
jpeek decode -t "your.jwt.token.here" -p
# Show only the header
jpeek decode -t "your.jwt.token.here" -H
# Get help
jpeek --help
jpeek decode --helpjpeek decode -t "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"Output:
π JWT Token Decoder
==================================================
π Header:
{
"alg": "HS256",
"typ": "JWT"
}
π Payload:
{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}
π Signature:
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
π
Issued: 2018-01-18 21:30:22 UTC
-t, --token <TOKEN>- JWT token to decode-h, --help- Print help information-V, --version- Print version information
-t, --token <TOKEN>- JWT token to decode (required)-p, --payload-only- Show only the payload-H, --header-only- Show only the header-h, --help- Print help information
- Rust 1.86.0 or later
- Cargo (comes with Rust)
- Clone the repository:
git clone https://github.com/Execute-Soft/jpeek.git
cd jpeek- Build the project:
cargo build- Run tests:
cargo test- Run the application:
cargo run -- -t "your.jwt.token.here"jpeek/
βββ src/
β βββ main.rs # Application entry point
β βββ app.rs # Main application logic
β βββ cli.rs # Command-line interface definitions
β βββ jwt.rs # JWT token parsing and display logic
βββ Cargo.toml # Project dependencies and metadata
βββ README.md # This file
- clap - Command-line argument parsing
- colored - Terminal color formatting
- base64 - Base64 decoding
- serde_json - JSON parsing and formatting
- serde - Serialization/deserialization
- chrono - Date and time handling
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Morshedul Islam Munna
- Email: morshedulmunna1@gmail.com
- GitHub: @morshedulmunna
- LinkedIn: Morshedul Islam Munna
Execute-Soft
- GitHub: @Execute-Soft
- Built with Rust
- Inspired by the need for a simple JWT token decoder
- Thanks to the Rust community for excellent libraries
- Add JWT token validation
- Support for different JWT algorithms
- Interactive mode for token input
- Export decoded data to different formats
- Add support for JWT token creation
β If you find this tool useful, please give it a star on GitHub!