JWT
Decode JWT and view the Header and Payload
Token
Loading...
Decoded Header
Loading...
Decoded Payload
Loading...
Decode JWT using jwt-decode
Install jwt-decode package from NPM, learn more about this package here.
npm install jwt-decode
Get header from a JWT
const yourJwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFwcHM0RGV2ZWxvcGVycyIsImlhdCI6MTUxNjIzOTAyMn0';
const header = jwt_decode(yourJwt, { header: true })
console.log(header);
Get payload from a JWT
const yourJwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFwcHM0RGV2ZWxvcGVycyIsImlhdCI6MTUxNjIzOTAyMn0';
const payload = jwt_decode(yourJwt)
console.log(payload);
© 2022 Apps4Developers. All rights reserved.