Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Is It Safe to Paste a JWT Into an Online Decoder? A 10-Second Check

The payload isn't secret, but the token is. Here is how to decode a JWT without handing your session to a stranger. You are debugging a login bug. The request fails, you copy the Authorization header, search "JWT decoder online", and paste the token into the first result. It takes five seconds. You have probably done it a hundred times. Most of the time nothing bad happens. But it is worth…

Decoding a JSON Web Token (JWT) is simple, but it's not enough to ensure safety. When you paste a JWT into an online decoder, you reveal valuable information about the user and the token itself. The payload, which is readable without any key or secret, contains claims such as user IDs, emails, roles, and internal service names. Even the signature, which verifies the token's authenticity, can be exposed when you paste the token into a decoder.

This is a potential security risk, as the decoded information could be logged, cached, or analyzed by anyone who accesses the decoder.

To check if an online JWT decoder decodes the token locally or sends it to a server, you can use the Developer Tools in your browser. Open the decoder page, press F12 to open the Network tab, clear the list, and then paste a fictional token into the decoder. If no new request appears while the claims are decoded, the decoder processes the token locally. However, if a request fires, your token leaves your machine and may be logged or analyzed by the decoder's server.

To protect yourself, use a throwaway token for testing or decode the token yourself using a script, such as Node.js. Simply run the following command in your terminal, replacing "$TOKEN" with your actual JWT: "node -e "console.log(JSON.parse(Buffer.from(process.argv[1].split('.')[1],'base64url')))" "$TOKEN". This command decodes the token locally, without involving a network, so nothing can leak. When decoding a real token, use a browser-based decoder or decode it locally with a script to ensure your token remains secure.

Rewritten by urgent.news; may contain errors — check the original.

Read the original at dev.to →

Report a problem with this story

More in Tech

Building a reusable read more toggle button

A bio on a wedding site, a long review on a poster page, a description on a dashboard card. Three places, one pattern: a boolean, a button, a slice of text.

  • Reusable toggle button component streamlines text truncation across web pages
  • CSS line-clamp and overflow control visible text portion
  • Single boolean state manages button visibility and accessibility

Why Do We Fear Results We Can Predict More Than Opinions We Can Never Know?

Sometimes, the things we can measure scare us more than the things we may never understand. Think about something strange. You meet hundreds of people throughout your life.

  • People fear definite outcomes more than unknown opinions
  • Concrete results create anxiety through potential harm
  • Unknown opinions allow comforting self-narratives

The county at the heart of America's data center boom hits pause on new projects

Loudoun County in Virginia is the data center capital of the world. It's Board of Supervisors just paused new projects as it reviews its regulations.

  • Loudoun County, Virginia halts new data center projects for a year.
  • County officials aim to review regulations and electrical substation applications.
  • Decision impacts 33 active applications and may affect local economy and environment.

More from Saturday 21 November →