this post was submitted on 19 Nov 2026
2 points (100.0% liked)

Cybersecurity

10815 readers
72 users here now

c/cybersecurity is a community centered on the cybersecurity and information security profession. You can come here to discuss news, post something interesting, or just chat with others.

THE RULES

Instance Rules

Community Rules

If you ask someone to hack your "friends" socials you're just going to get banned so don't do that.

Learn about hacking

Hack the Box

Try Hack Me

Pico Capture the flag

Other security-related communities !databreaches@lemmy.zip !netsec@lemmy.world !securitynews@infosec.pub !cybersecurity@infosec.pub !pulse_of_truth@infosec.pub

Notable mention to !cybersecuritymemes@lemmy.world

founded 3 years ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] dihutenosa@piefed.social 4 points 25 minutes ago

Of course not. Whence the idea? Use local tools like

  • cut
  • base64 -d
  • jq
    … to inspect token contents.
[–] YourBestFriend@quokk.au 4 points 29 minutes ago (1 children)

No. It’s just a dot separated array of base64 encoded strings. You don’t need any fancy debug

const jwt = "PASTE_JWT_HERE";
const [header, payload] = jwt.split(".");

const decode = (part) => JSON.parse(
  new TextDecoder().decode(
    Uint8Array.from(
      atob(part.replace(/-/g, "+").replace(/_/g, "/")),
      c => c.charCodeAt(0)
    )
  )
);

console.log("Header:", decode(header));
console.log("Payload:", decode(payload));
[–] pcouy@lemmy.pierre-couy.fr 1 points 22 minutes ago (1 children)

For just the payload on bash : echo "$TOKEN" | cut -d '.' -f2 | base64 --decode | jq -C . (the last pipe and jq command can be dropped if you don't have it installed)

[–] YourBestFriend@quokk.au 1 points 9 minutes ago

Sassy.

base64 -d <<< "${TOKEN//./ }"