Datatypes

JSON Web Token (JWT)

ID jwt

DatatypeNot PIIidentifierDraft

This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).

Compact JSON Web Token (RFC 7519) signed with JWS: three Base64url parts (header, claims and signature) separated by dots. The header and the claims are JSON objects, so both parts start with ey. Used as bearer access tokens and ID tokens; the encrypted JWE form has five parts and is not covered.

Categories
Secrets and credentials (passwords, keys, tokens)
Countries
Global (not tied to a country)
Languages
Common to most languages
Quality
78/100 · missing: second example, mapping (Wikidata, Schema.org, ...), translation
Metacrafter rules
no detection rule yet
Supported by tools
Amazon Macie, detect-secrets, Gitleaks, Nightfall AI, Semgrep, TruffleHog

Regular expression

^ey[A-Za-z0-9_-]+\.ey[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*$

Python re syntax.

Examples

ValueDescription
eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXkExample JWT from RFC 7519, section 3.1
eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 invalidHeader part alone

Sources

Use this record