Encoded Token

HEADERAlgorithm: RS256
{
  "alg": "RS256",
  "kid": "f77ad8d8a78b34c8d2dd4e3a3a3b4c5d6e7f8a9b",
  "typ": "JWT"
}
PAYLOADIssued: Oct 25, 2025, 08:00:00 · Expired
{
  "iss": "https://accounts.google.com",
  "azp": "123456789-abc.apps.googleusercontent.com",
  "aud": "123456789-abc.apps.googleusercontent.com",
  "sub": "114567890123456789012",
  "email": "jane.doe@example.com",
  "email_verified": true,
  "at_hash": "jKLm8N3Pqr_StuvwXY12Aw",
  "name": "Jane Doe",
  "picture": "https://lh3.googleusercontent.com/a/AGNmyxYcDemo123",
  "given_name": "Jane",
  "family_name": "Doe",
  "iat": 1761379200,
  "exp": 1761382800
}
SIGNATUREPresent
HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  secret
)

This tool decodes JWT tokens for inspection only. No signature verification is performed. Never trust unverified tokens in production.

Google ID Tokens Have Stricter Validation Rules

Google's OAuth 2.0 / OpenID Connect implementation issues two distinct token types: an access token (an opaque string used to call Google APIs) and an ID token (a JWT containing identity claims). When developers say "decode the Google token", they almost always mean the ID token. Decoding the access token won't work — it isn't a JWT at all.

Google ID tokens carry standardized OIDC claims, plus a few Google-specific ones like at_hash (a partial hash of the access token, used to bind the two tokens together). The decoder here is pre-loaded with a representative Google ID token. Replace it with your own to inspect what Google actually returned to your app.

Validation Checklist for Google ID Tokens

Per Google's official docs, every claim below must validate before you trust the token server-side. The decoder shows them; your code must check them:

  • iss — Must be exactly https://accounts.google.com or accounts.google.com. Anything else is a forged token.
  • aud — Must equal your OAuth client ID. If you have multiple clients (web + iOS + Android), each is a separate audience.
  • azp — The "authorized party". For most apps this equals aud, but for apps with multiple clients, azp identifies the specific client.
  • exp — Google ID tokens expire 1 hour after issuance. Any longer lifetime is a forgery.
  • email_verified — Critical. true means Google has verified ownership of the email. Treating an unverified email as authoritative is the #1 OAuth security mistake.
  • at_hash — A SHA-256 half-hash of the access token, base64url-encoded. Validates that the access token wasn't swapped between services.
  • hd — Present only for Google Workspace accounts. Equals the user's hosted domain (e.g., example.com). Useful for restricting sign-in to corporate accounts.

Common Pitfalls

"My token has email but email_verified is false." This happens when a user signs up with a Google account they haven't confirmed via email. Treat the email as user-claimed, not verified. Don't auto-link accounts on this basis.

"aud doesn't match my client ID exactly." Google issues different ID tokens for different OAuth clients in the same project. Confirm you're comparing against the right client ID — web vs iOS vs Android each have unique IDs.

"The token is decoded but I can't verify the signature." Google rotates their JWKS keys frequently. Your verification library must fetch https://www.googleapis.com/oauth2/v3/certs on each verification (or cache with TTL).

Related Resources

Common Use Cases

Related Articles