io.jsonwebtoken.SignatureException: JWT signature does not match locally computed signature.: what it means and how to fix it

TL;DR: Validate locally, fix the first real error, validate again (no upload).

Fix io.jsonwebtoken.SignatureException: JWT signature does not match locally computed signature. by decoding safely and locally (no upload).

What the error means

io.jsonwebtoken.SignatureException: JWT signature does not match locally computed signature. means a decoder rejected the input as invalid encoding. The fastest path is to identify what format you have, normalize it, then decode again.

Most common real-world causes

  • JWT problems are often: not 3 segments, wrong key/algorithm, or option mismatch (aud/iss/sub).
  • The input is not actually encoded in the expected format (Base64 vs Base64URL vs plain text).
  • You copied only part of the string (truncated token/payload).
  • Whitespace/newlines were introduced during copy/paste.
  • Wrong character set: URL-safe Base64 uses '-' and '_' instead of '+' and '/'.
  • You decoded using the wrong function (decodeURIComponent on non-URL-encoded data, atob on non-Base64).

Fast debugging steps

  • If you see a JWT library error, decode the token parts first to confirm structure and claims.
  • Confirm what you are decoding (URL encoding, Base64, Base64URL, JWT).
  • Trim whitespace and remove line breaks before decoding.
  • If it's a JWT, ensure it has 3 dot-separated parts (header.payload.signature).
  • If it's Base64URL, convert '-' -> '+' and '_' -> '/' and add padding if needed.

Code example (java)

import java.util.Base64;

String[] parts = token.split("\\.");
if (parts.length != 3) throw new RuntimeException("JWT must have 3 segments");

String headerJson = new String(Base64.getUrlDecoder().decode(parts[0]));
String payloadJson = new String(Base64.getUrlDecoder().decode(parts[1]));

System.out.println("header=" + headerJson);
System.out.println("payload=" + payloadJson);
// Signature verification requires the signing key (public/secret).

Fix without uploading data

Encoded strings often contain secrets (tokens, IDs). Decode locally and share only redacted snippets.

FAQ

Is Base64 the same as Base64URL? No. Base64URL uses '-' and '_' and often omits padding. Normalize before decoding.

Does decoding a JWT verify it? No. Decoding shows claims; verification requires the signing key.

Privacy & Security
All processing happens locally in your browser. Files are never uploaded.

Next pages to check

Closest crawled pages without impressions yet. Added to speed first-impression conversion.

neighbor java csharp stj could not be converted system int32 value checklists webhooksneighbor java csharp stj could not be converted system timespan value troubleshooting anneighbor csharp csharp stj could not be converted system double createdat workflows webhneighbor java csharp stj could not be converted system int32 user id runbooks data imporneighbor csharp csharp stj could not be converted system double id workflows webhooksneighbor csharp csharp stj could not be converted system int32 id workflows analytics pineighbor csharp csharp stj could not be converted system int32 id workflows api gatewayneighbor csharp csharp stj could not be converted system int32 id workflows webhooksneighbor csharp csharp stj could not be converted system int32 user email checklists ananeighbor csharp csharp stj could not be converted system int32 value troubleshooting mulneighbor csharp csharp stj could not be converted system timespan status workflows api gneighbor csharp csharp stj could not be converted system timespan status workflows webhoneighbor csharp java jackson cannot deserialize instance java lang integer out of start neighbor csharp java jackson cannot deserialize instance java util list out of start arrneighbor csharp java jackson cannot deserialize java lang boolean from string 2026 02 1 neighbor csharp java jackson cannot deserialize java lang boolean from string 2026 02 1 neighbor csharp java jackson cannot deserialize java lang integer from string true workfneighbor csharp java jackson cannot deserialize java lang integer from string true workf

Quick fix checklist

  • Reproduce the error on a minimal input.
  • Check type/format and field mapping.
  • Apply the smallest safe fix.
  • Validate on production-like payload.