JWT Decoder for C# / .NET

Paste any JWT to decode it instantly — then use the C# .NET code examples below to decode and verify JWTs in your ASP.NET Core or .NET application.

100% in-browser — nothing uploaded

Encoded JWT

HeaderPayloadSignature
Awaiting a token — everything is decoded locally in your browser.

Decoded Header

Paste a token to decode this segment.

Decoded Payload

Paste a token to decode this segment.

Verify Signature

Enter the secret to verify the signature

Features

100% private

Your token is decoded entirely in your browser. Nothing is uploaded, logged, or sent to any server or API.

Instant decoding

Paste a JWT and the header, payload, and claims are decoded in real time — no button required.

Human-readable claims

Standard claims like exp, iat, and nbf are explained and shown as readable dates with expiry status.

Signature verification

Verify HS256/384/512 with a secret, or RS, PS, and ES algorithms with a public key — all client-side.

C# .NET JWT guide

How to decode and verify JWTs in C# .NET

In .NET, JWT handling is provided by the System.IdentityModel.Tokens.Jwt NuGet package. The JwtSecurityTokenHandler class can read, validate, and create JWTs. For ASP.NET Core applications, the Microsoft.AspNetCore.Authentication.JwtBearer package provides middleware that automatically validates incoming Bearer tokens on protected endpoints.

For validation, provide a TokenValidationParameters object specifying the signing key, valid issuers, valid audiences, and other requirements. The handler returns a ClaimsPrincipal if validation succeeds, or throws a SecurityTokenException subclass if not. For OIDC providers like Azure AD or Auth0, use the Microsoft.Identity.Web package which handles JWKS fetching and configuration automatically.

Use the decoder above to instantly inspect any JWT — no .NET environment needed. The snippet below shows the core patterns for decoding and validating JWTs in C#.

C# — System.IdentityModel.Tokens.Jwt

csharp
using System.IdentityModel.Tokens.Jwt;
using Microsoft.IdentityModel.Tokens;

var handler = new JwtSecurityTokenHandler();

// Read without validation (inspection only)
var token = handler.ReadJwtToken(tokenString);
Console.WriteLine(token.Header.Alg);
foreach (var claim in token.Claims)
    Console.WriteLine($"{claim.Type}: {claim.Value}");

// Validate + decode (HS256)
var key = new SymmetricSecurityKey(
    Encoding.UTF8.GetBytes(secret));
var validationParams = new TokenValidationParameters {
    ValidateIssuerSigningKey = true,
    IssuerSigningKey = key,
    ValidateIssuer = true,
    ValidIssuer = "https://auth.example.com",
    ValidateAudience = true,
    ValidAudience = "https://api.example.com",
    ClockSkew = TimeSpan.Zero
};
var principal = handler.ValidateToken(
    tokenString, validationParams, out _);
Step by step

How to decode a JWT token online

1

Paste your token

Copy a JSON Web Token and paste it into the encoded box. You can also load the example token to try it out.

2

Read the decoded data

The header and payload are decoded instantly. Switch to the Claims tab for plain-English explanations and expiry status.

3

Verify the signature

Enter the secret (HMAC) or public key (RSA/ECDSA) to confirm the token is authentic and hasn't been tampered with.

FAQ

Frequently asked questions