JWT nbf Claim Is a String – Fix a Non-Numeric Not-Before Time

Local only

Inspect a string-valued nbf claim and keep type correction in the issuer rather than the decoder.

93 chars · 1 line

120 chars · 10 lines

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

JWT NumericDate troubleshooting

How to fix a JWT nbf claim encoded as a string

A quoted nbf value is valid JSON, so the token can decode, but NumericDate semantics expect a number. The decoder preserves the string instead of silently converting claim types. 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 JSON type of nbf.
  2. Fix the token issuer to emit a JSON number instead of text.
  3. Reissue and verify the token rather than editing signed payload bytes.

Claim types should not be guessed

A decoder that coerced numeric-looking strings would hide issuer mistakes. Preserving the original JSON type makes the mismatch visible.

String versus numeric nbf

The quoted form remains text in the decoded payload.

Incorrect claim

"nbf":"2000000000"

Numeric form

"nbf":2000000000

Common questions

Frequently asked questions

Is string nbf invalid JSON?

No. It is a valid JSON string, which is why decoding succeeds.

Will this decoder convert it automatically?

No. It preserves the issuer's claim type.

Where should the fix happen?

In the token issuer or claim-generation code.

Debugging a specific JWT issue? Browse JWT troubleshooting.