decode jwt token without using jwt.io

Millan K
2 min readAug 19, 2024

--

How to decode jwt token using postman in 2 minutes !!

3 parts of JWT token described by Millan Kaul

Background:

Most of the developers and QA have pasted jwt tokens on jwt.io as nothing else seems more reliable than that to copy your secrets.

But its less of a fact that we read this on the same website

Warning: JWTs are credentials, which can grant access to resources. Be careful where you paste them! We do not record tokens, all validation and debugging is done on the client side.

Screen shot of jwt debugger showing a warning while you use jwt decoder to decode jwt token that contains secret
https://jwt.io/

Postman Test tab

var jwt_token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'var one = JSON.parse(atob(jwt_token.split('.')[0]));var two = JSON.parse(atob(jwt_token.split('.')[1]));var three = jwt_token.split('.')[2];console.log (one);console.log (two);console.log (three);var one1 = JSON.stringify(two)pm.test('one -----> ' + JSON.stringify(one), function () {});pm.test('two -----> ' + JSON.stringify(two), function () {});pm.test('three ---> ' + three, function () {});
Test Result tab showing decoded values of jwt token

I posted on Linkedin about basic knowledge on jwt on this post

❤️ Follow me on 👉 Twitter🦜MillanKaul@Twitter | LinkedIn 🟦 MillanKaul@Linkedin

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Millan K
Millan K

Written by Millan K

Quality Engineering Leadership - I write, share using ➡️ #QualityWithMillan , I also write my blog https://QualityWithMillan.github.io

No responses yet

Write a response