explaingit

milovance23/jwt-lens

Analysis updated 2026-05-18

2HTMLAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A single offline HTML file for decoding and verifying JWT login tokens without sending them over the network.

Mindmap

mindmap
  root((jwt-lens))
    What it does
      Decode JWTs
      Verify signatures
      Flag expired tokens
    Tech stack
      HTML
      JavaScript
      WebCrypto
    Use cases
      Debug login tokens
      Audit token security
    Audience
      Developers
      Security reviewers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Decode a JWT to inspect its claims and expiration without pasting it into an online tool.

USE CASE 2

Verify a token's signature offline using a shared secret or public key.

USE CASE 3

Check whether a JWT-based auth system is issuing tokens with the expected algorithm and claims.

What is it built with?

HTMLJavaScriptWebCrypto

How does it compare?

milovance23/jwt-lens100/talk_stockalexcybernetic/playground-ai
Stars222
LanguageHTMLHTMLHTML
Last pushed2022-03-24
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity1/53/51/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Public domain. Use it for any purpose with no restrictions or attribution required.

In plain English

JWT Lens is a tool for reading and checking JSON Web Tokens, a common format used to prove who a user is when they log into a website or app. Instead of running as a website you visit, it is a single HTML file you save to your own computer and open directly in a browser, with no server, no installation, and no dependencies to set up. The idea behind it is trust. Most online JWT decoders ask you to paste in a token and simply promise that nothing is sent over the network. JWT Lens tries to remove that promise from the equation. The file ships with a browser security setting called a Content Security Policy set to block all network requests, so even if the code were changed to try to send your data somewhere, the browser itself would stop it. Because it is a single file, someone can also read through the whole source before deciding to trust it. To use it, you open the file and paste in a token. It decodes the token as you type and shows the expiration, issued-at, and not-before timestamps in both local time and relative time, flagging whether the token is expired or not yet valid. If you also paste in the matching key, whether that is a shared secret or a public key, it will verify the token's signature using the browser's built-in cryptography tools. It supports a wide range of signing algorithms, and it is careful about edge cases: tokens with no signature at all are labeled unsigned rather than valid, encrypted tokens are identified rather than mishandled, and pasting in a private key by mistake triggers a warning instead of a false verification. The project includes a test suite of 42 automated checks covering real signed tokens, tampering detection, and a check that the file makes no outside network calls. It is released under the Unlicense, meaning it is public domain and free to use for any purpose.

Copy-paste prompts

Prompt 1
Explain how to use jwt-lens to decode and verify a JWT offline.
Prompt 2
Show me how the Content-Security-Policy in jwt-lens.html blocks all network requests.
Prompt 3
Help me run the jwt-lens test suite with node test.js and understand what it checks.
Prompt 4
Walk me through verifying an RS256-signed token using jwt-lens and a PEM public key.

Frequently asked questions

What is jwt-lens?

A single offline HTML file for decoding and verifying JWT login tokens without sending them over the network.

What language is jwt-lens written in?

Mainly HTML. The stack also includes HTML, JavaScript, WebCrypto.

What license does jwt-lens use?

Public domain. Use it for any purpose with no restrictions or attribution required.

How hard is jwt-lens to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is jwt-lens for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.