JWT exp Claim Is a String – Fix a Non-Numeric Expiration

Local only

Inspect an exp claim encoded as a JSON string rather than a numeric seconds-since-epoch value.

93 chars · 1 line

120 chars · 10 lines

Algorithm: HS256Signature not verifiedTime status: Not evaluated (invalid exp/nbf)exp claim: Invalid NumericDate (expected number)

JWT NumericDate issue

How to fix a JWT exp claim encoded as a string

The payload can still be valid JSON when exp is quoted, so decoding succeeds. However, this decoder only treats a finite JSON number as a JWT NumericDate; a string such as "1700000000" remains visible in the payload and does not produce Expires or Expired details. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • Browser-local JWT decoding
  • Strict three-segment validation
  • Canonical Base64URL checks
  • Header and payload JSON validation
  • Expiration status details
  • No signature verification claims

Steps

  1. Inspect the decoded payload and note whether exp is surrounded by quotes.
  2. Compare the claim with a numeric JSON value such as 1700000000.
  3. Fix the issuer that constructs the token rather than editing an already signed JWT.

Valid JSON does not mean valid NumericDate semantics

A quoted timestamp is ordinary JSON text. The decoder preserves it exactly but intentionally does not reinterpret text as a NumericDate number.

String exp versus numeric exp

Only the numeric form is formatted as an expiration timestamp.

String claim

"exp":"1700000000"

Numeric claim

"exp":1700000000

Common questions

Frequently asked questions

Why does the JWT still decode?

Because the payload is valid JSON. The issue is the claim value type, not JWT segment decoding.

Will the decoder coerce the string to a number?

No. It preserves JSON types instead of silently changing claim data.

Should I edit the JWT payload manually?

No. Changing the payload changes the signed bytes. Correct token generation at the issuer.

Debugging a specific JWT issue? Browse JWT troubleshooting.