Skip to content

Instantly share code, notes, and snippets.

@somidad
Created April 10, 2022 02:42
Show Gist options
  • Save somidad/cdb9c0af3dadd2193fe9c3a70e4f3301 to your computer and use it in GitHub Desktop.
Save somidad/cdb9c0af3dadd2193fe9c3a70e4f3301 to your computer and use it in GitHub Desktop.
Decode JWT (without verification)
const [header, payload, signature] = jwt.split('.');
const buffer = Buffer.from(payload, 'base64');
const decoded = JSON.parse(buffer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment