Zero Server Calls β’ Zero Data Logging β’ Instant Offline-Ready In-Browser Decoding
π Try Live Demo β’ π Documentation β’ β‘ Quick Start β’ π§ͺ Testing β’ π Socials
Important
π 100% Client-Side Privacy Guarantee
Your tokens, keys, and payload claims never leave your browser. All Base64Url parsing, UTF-8 conversion, JSON syntax highlighting, and timestamp checks are computed locally in client-side memory using the web browser's native engine. No backend API or third-party tracking is used.
|
Decodes standard JWTs in real-time as you type. No submit button required. Full offline support after dependency installation. |
Visually segments tokens into HEADER, PAYLOAD, and SIGNATURE with live character counts and byte sizes. |
|
Real-time relative calculation for |
Built-in registry of RFC 7519 & OpenID Connect registered claims with instant search, filtering (All / Standard / Custom), and human-readable descriptions. |
|
Handles international UTF-8 character encodings (Japanese Kanji, German umlauts, Spanish accents, and emojis) without throwing |
One-click clipboard copy for formatted Header JSON, Payload JSON, raw signature segments, and individual claim values with visual feedback. |
You can try the live, fully interactive version of this tool online at:
π https://himat.tech/free-tools/jwt-decoder
A standard JSON Web Token is comprised of three dot-separated Base64Url-encoded sections:
| Section | Color | Purpose | Example Contents |
|---|---|---|---|
| Header | π΄ Rose | Token type & signing algorithm | {"alg": "HS256", "typ": "JWT"} |
| Payload | π£ Purple | Claims, user identity, & timestamps | {"sub": "12345", "name": "Alex", "exp": 1819440000} |
| Signature | π’ Teal | Binary cryptographic verification digest | dBjftJeZ4CVP-mB92K27uhbUJU1p1r... |
Because decoding a standard Base64Url-encoded token structure does not require knowing the signing secret or private key, this application supports decoding tokens from all standard RFC 7518 JWS algorithms:
- HMAC (Symmetric):
HS256,HS384,HS512 - RSASSA-PKCS1-v1_5 (Asymmetric):
RS256,RS384,RS512 - ECDSA (Asymmetric):
ES256,ES384,ES512 - RSASSA-PSS (Asymmetric):
PS256,PS384,PS512 - Edwards-Curve:
EdDSA(Ed25519,Ed448) - Unsecured:
none
- Node.js:
v18.0.0or higher - npm:
v9.0.0or higher
- Clone the repository:
git clone https://github.com/himat-technology/jwt-decoder.git
cd jwt-decoder- Install dependencies:
npm install- Launch local development server:
npm run devOpen your browser and navigate to http://localhost:3000.
To generate an optimized, zero-dependency static production bundle:
npm run buildThe compiled assets will be in the dist/ folder and can be deployed instantly to Vercel, Netlify, Cloudflare Pages, GitHub Pages, or any static file server.
To preview the production build locally:
npm run previewRun the complete Vitest test suite:
npm run testTo run tests with interactive watch mode:
npm run test:watchTest Suite Coverage:
jwtDecoder.test.ts: ASCII Base64Url decoding, UTF-8 / multi-byte Unicode strings, malformed token sections, invalid Base64, and JSON syntax errors.jwtValidation.test.ts: Algorithm metadata, RFC 7519 standard claims vs. custom application claim detection.timestampUtils.test.ts: Human-readable date formatting,expexpiration logic,nbffuture/active validation, and relative time calculations.
jwt-decoder/
βββ src/
β βββ components/
β β βββ Header.tsx # Sticky brand navbar with client-side status & socials
β β βββ JwtInput.tsx # Live JWT textarea, sample selector, paste & clear
β β βββ TokenStructure.tsx # Color-coded token breakdown (Header.Payload.Signature)
β β βββ JsonViewer.tsx # Syntax-highlighted JSON viewer with line numbers & copy
β β βββ ClaimInspector.tsx # Claims explorer with search, filters, and RFC descriptions
β β βββ TimestampStatus.tsx # Real-time auto-updating timestamp cards (exp, nbf, iat)
β β βββ CopyButton.tsx # Accessible clipboard copy button with feedback
β β βββ FeatureSection.tsx # 6 core feature showcase cards
β β βββ HowItWorks.tsx # 3-step walkthrough guide
β β βββ FAQ.tsx # Accordion FAQ answering security & algorithm questions
β β βββ Footer.tsx # Security disclaimers, links & credits
β βββ hooks/
β β βββ useJwtDecoder.ts # Custom hook for reactive decoding & 5s timestamp ticker
β βββ utils/
β β βββ jwtDecoder.ts # Base64Url decoding, UTF-8 parsing, and diagnostics
β β βββ jwtValidation.ts # RFC 7519 / OIDC claim registry and algorithm metadata
β β βββ timestampUtils.ts # Human date formatting, relative time calculation
β β βββ sampleJwt.ts # High-quality standard, expired, and unicode demo tokens
β β βββ __tests__/ # Comprehensive Vitest unit test suite
β β βββ jwtDecoder.test.ts
β β βββ jwtValidation.test.ts
β β βββ timestampUtils.test.ts
β βββ types/
β β βββ jwt.ts # Comprehensive TypeScript interfaces
β βββ App.tsx # Main page orchestrator
β βββ main.tsx # React DOM root mounting
β βββ index.css # Global Tailwind CSS and custom styling
βββ public/
β βββ favicon.svg # Custom SVG brand favicon
βββ package.json # Project dependencies and npm scripts
βββ vite.config.ts # Vite + Vitest config
βββ tsconfig.json # Strict TypeScript configuration
βββ tsconfig.node.json # TypeScript Node bundler config
βββ tailwind.config.js # Color palette, dark theme, and fonts
βββ postcss.config.js # PostCSS setup
βββ eslint.config.js # ESLint configuration
βββ README.md # Comprehensive documentation
βββ .gitignore # Git ignored files
Warning
Decoding is NOT Cryptographic Verification:
Decoding a JSON Web Token merely reveals what is encoded in its header and payload. Anyone can fabricate or alter an unverified payload. Never trust unverified JWT payloads in backend authorization decisions without cryptographically validating the signature with your secret key (HMAC) or public key (RSA/ECDSA).
Stay connected with HiMat Technology for updates, developer tools, and open-source releases:
| Platform | Link |
|---|---|
| π Official Website | himat.tech |
| β‘ Live JWT Tool | himat.tech/free-tools/jwt-decoder |
| π GitHub | @himat-technology |
| πΌ LinkedIn | company/himat-technology |
| πΈ Instagram | @himat_technologies |
| π Facebook | Himat-technology |
This project is licensed under the MIT License β free for personal and commercial use.