Library API
    Preparing search index...

    Function decodeJWT

    • Performs a fast, unverified decode of a JSON Web Token (JWT) payload. The payload is unverified and attacker-controlled. Use only for reading public claims and must not be used for authentication, authorization, or any other security decision.

      Type Parameters

      • T = any

      Parameters

      • jwt: string

        The JWT string to decode

      Returns T | null

      The parsed payload object, or null if decoding fails

      const payload = decodeJWT`<MyClaims>`(token);