<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>webcodr</title>
    <link>https://webcodr.io/topics/ai/</link>
    <description>Recent content on webcodr</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 24 Jul 2026 20:28:38 +0000</lastBuildDate>
    <atom:link href="https://webcodr.io/topics/ai/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>jwtd - your fully local CLI JWT decoder</title>
      <link>https://webcodr.io/2026/07/jwtd-your-fully-local-cli-jwt-decoder/</link>
      <pubDate>Fri, 24 Jul 2026 20:28:38 +0000</pubDate>
      <guid>https://webcodr.io/2026/07/jwtd-your-fully-local-cli-jwt-decoder/</guid>
      <description>A few months ago I looked for a local JWT decoder and didn’t like what I found, so I decided write a small CLI-based decoder that works fully offline. No token will ever leave the machine it’s running on.
Nothing big, just a tiny program written in Go to decode a JWT with go-jose and print the JSON contents to the console. I wanted a short name. JWT decode or jwtd. No fancy name, just a useful tool.
</description>
      <content:encoded><![CDATA[<p>A few months ago I looked for a local JWT decoder and didn&rsquo;t like what I found, so I decided write a small CLI-based decoder that works fully offline. No token will ever leave the machine it&rsquo;s running on.</p>
<p>Nothing big, just a tiny program written in Go to decode a JWT with go-jose and print the JSON contents to the console. I wanted a short name. JWT decode or <code>jwtd</code>. No fancy name, just a useful tool.</p>
<p>A friend asked if it could verify signatures or decrypt JWE contents. Nope, but that was a perfect opportunity to try Opus 4.6 which was pretty new at the time.</p>
<p>Many iterations and tokens later, the <code>jwtd</code> can do much more. Yes, it&rsquo;s mostly written by AI agents, but it&rsquo;s still small enough to understand what&rsquo;s going on and there&rsquo;s a pretty large test suite to ensure quality. I use multiple models and regularly check with if something can be improved, make security audits etc. &ndash; I will not ship a program I can&rsquo;t understand or I feel insecure about.</p>
<h2 id="what"><a href="#what" class="heading-anchor">What?</a></h2>
<p>The main focus is still decoding JWTs and show the contents. Of course with colored output and timestamps are human-readable (an expiration warning for <code>exp</code> fields is coming soon). We support a wide variety of JWS signatures, JWE key types and JWE content encryption algorithms.</p>
<p>There&rsquo;s an interactive mode for tokens and keys, so you didn&rsquo;t have to clean up your history afterwards. You can also pipe a token into <code>jwtd</code> if you like. We&rsquo;re also accepting keys via environment variable and even support raw HMAC secrets.</p>
<h2 id="where"><a href="#where" class="heading-anchor">Where?</a></h2>
<p>All major operating systems are supported, but to be honest, my main focus is macOS and Linux. You can get <code>jwtd</code> via Homebrew, the AUR, Fedora COPR, Nix and Scoop. WinGET is coming soon. There are also pre-built deb and rpm packages available on GitHub.</p>
<h2 id="how"><a href="#how" class="heading-anchor">How?</a></h2>
<p>To decode a token just supply it as argument:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ jwtd eyJhbGciOiJSUzI1NiIs...
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Header:
</span></span><span class="line"><span class="cl"><span class="o">{</span>
</span></span><span class="line"><span class="cl">  <span class="s2">&#34;alg&#34;</span>: <span class="s2">&#34;RS256&#34;</span>,
</span></span><span class="line"><span class="cl">  <span class="s2">&#34;typ&#34;</span>: <span class="s2">&#34;JWT&#34;</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Payload:
</span></span><span class="line"><span class="cl"><span class="o">{</span>
</span></span><span class="line"><span class="cl">  <span class="s2">&#34;sub&#34;</span>: <span class="s2">&#34;user_2048&#34;</span>,
</span></span><span class="line"><span class="cl">  <span class="s2">&#34;admin&#34;</span>: true,
</span></span><span class="line"><span class="cl">  <span class="s2">&#34;iat&#34;</span>: <span class="s2">&#34;2026-07-22T03:00:00Z (1784689200)&#34;</span>,
</span></span><span class="line"><span class="cl">  <span class="s2">&#34;exp&#34;</span>: <span class="s2">&#34;2026-07-22T04:00:00Z (1784692800)&#34;</span>,
</span></span><span class="line"><span class="cl">  <span class="s2">&#34;note&#34;</span>: null
</span></span><span class="line"><span class="cl"><span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Signature: eyJfX2p3dGRfXyI...
</span></span></code></pre></div><p>Need to verify a JWS signature?</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">jwtd --key /path/to/public-key.pem eyJhbGciOiJSUzI1NiIs...
</span></span></code></pre></div><p>For decryption just use the private key instead of the public key.</p>
<p>Don&rsquo;t want to pass the key path as parameter? No problem, just use the environment variable <code>JWTD_KEY</code>.</p>
<p>To use the interactive mode just omit the token or the value of the key parameter.</p>
<p>That&rsquo;s just a small overview, you can find a full usage guide, every installtion option and more on the official website <a href="https://jwtd.sh/">jwtd.sh</a> or on <a href="https://github.com/webcodr/jwtd">GitHub</a>.</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
