JWT Formatter & Decoder
Paste your encoded JSON Web Token (JWT) below to instantly decode, validate, and format its hidden Header, Payload, and Signature components.
What is a JWT Formatter & Decoder?
A JSON Web Token (JWT) is a compact, URL-safe way to securely pass authentication data between a client and a server. Because they are designed to be read efficiently by machines, they are encoded into a dense, unbroken string of characters separated by two periods (.).
A JWT Formatter & Decoder serves as a security-first visual inspection tool. It breaks this compressed authentication string into its distinct cryptographically signed parts and decodes them back into clean, colorized, readable JSON objects.
The Anatomy of a JWT: How It Decodes
Every valid JSON Web Token is composed of three distinct segments separated by dot configurations: Header.Payload.Signature. When you paste a token into the decoder, the application splits the string at these dots and translates the first two blocks independently:
Plaintext
[Header String] . [Payload String] . [Cryptographic Signature]
1. The Header (Algorithm & Token Type)
The first block of the token contains operational metadata. When passed through the decoder, it reveals:
alg: The cryptographic algorithm used to secure the token (such asHS256,RS256, orEdDSA).typ: The type of token, which is almost always explicitly set to"JWT".
2. The Payload (Claims & User Permissions)
The middle section contains the “claims”—the actual application data being passed. The decoder breaks down these short keys into identifiable properties:
sub(Subject): The unique identifier or user ID of the authenticated person.name/email: Profile information passed along to the front-end application wrapper.iat(Issued At): A Unix timestamp marking the exact second the token was generated.exp(Expiration Time): The timestamp marking exactly when the session token dies and invalidates.
3. The Signature (Security Boundary)
The final part of the string is the signature. The formatter displays this to prove the token’s structural integrity. It is generated by taking the encoded header, the encoded payload, a secret key, and running them through the algorithm specified in the header.
Behind the Scenes: Base64url Decoding
A common point of confusion is assuming JWT tokens are encrypted. They are not. They are simply encoded using a format called Base64url.
Base64url is a standard Base64 encoding modified to be safe for web addresses by swapping out URL-breaking characters:
- It replaces plus signs (
+) with hyphens (-). - It replaces forward slashes (
/) with underscores (_). - It strips out trailing equals signs (
=) used for padding.
Our decoder safely reverses this conversion process entirely on your device, converting the raw bytes back into readable UTF-8 text before running the formatting highlight loops.
Why 100% Local Decoding Matters
When debugging authentication setups, pasting live JWT access tokens into random third-party internet sites can introduce critical security vulnerabilities. If a tool transmits your token to an external server for parsing, an attacker tracking that network traffic or accessing those logs could intercept the token and impersonate your users.
Our tool provides absolute client-side isolation. The decoding engine relies entirely on standard in-browser JavaScript functions (atob and decodeURIComponent). The data is parsed directly inside your browser’s local memory footprint and never travels over an external API, keeping your production authentication keys safe and hidden.
