auth0/jwt-decode

Decode JWT tokens; useful for browser applications.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 7 minutes ago
Added to GitGenius on September 20th, 2026
Created on February 24th, 2014
Open Issues & Pull Requests: 18 (+0)
GitHub issues: Enabled
Number of forks: 344
Total Stargazers: 3,398 (+0)
Total Subscribers: 133 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 376 days
Stale 30+ days: 2
Stale 90+ days: 1

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • feature request (2)
  • bug (1)
  • closed:stale (1)
  • waiting for customer (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

jwt-decode is a browser library that decodes JWT tokens by extracting and parsing their Base64Url-encoded components.

The library solves the problem of extracting claims and header information from JSON Web Tokens in client-side applications. It works by parsing the three dot-separated parts of a JWT and decoding the specified section (header or payload) from Base64Url format into readable JSON. The library explicitly does not validate tokens—it only decodes well-formed JWTs. The README emphasizes that token validation must occur on the server side using appropriate middleware or authentication libraries.

The tool suits browser applications and client-side JavaScript environments where you need to inspect token contents after receiving them from an authentication server. It works in modern browsers and supported Node.js environments that have access to the atob() function. For environments without atob() support, such as older React Native versions, the library requires a polyfill. The README names express-jwt, koa-jwt, and Microsoft.AspNetCore.Authentication.JwtBearer as server-side validation alternatives but makes no comparisons to other client-side decoding libraries.

The project maintains active CI/CD automation through CircleCI. The library provides detailed error handling with specific InvalidTokenError messages for malformed tokens, missing parts, invalid Base64 encoding, or invalid JSON. TypeScript support includes generic type parameters allowing developers to specify expected return types and extend the standard JwtPayload and JwtHeader interfaces for custom claims.