How to Decode JWT Tokens from the Command Line

How to Decode JWT Tokens from the Command Line

Decoding JWT tokens can be a crucial part of debugging and understanding the authentication and authorization processes in your applications. Whether you’re working on a microservices architecture or a single-page application, being able to quickly inspect JWT tokens can save you a lot of time. In this post, I’ll walk you through how to decode JWT tokens from the command line using tools like base64 and jq. The Problem JWT tokens are compact, URL-safe means of representing claims to be transferred between two parties. They are commonly used for authentication and information exchange. However, JWT tokens are often encoded, making them unreadable. Decoding them manually can be cumbersome, especially if you need to do it frequently during development or debugging. ...

Dec 19, 2025 · 8 min · 1610 words · IAMDevBox