Toolvito

Works on this device

API Token Format Checker

Paste a token and see whether its form is right: the three parts of a signed JWT, the five parts of an encrypted one, or the length and characters of an opaque token or API key. Or check a key against the format your provider documents. The token is checked in this page and is never sent anywhere.

Check a token

Pastes a token and checks its form: the parts of a JWT, or the length and characters of an opaque token or key. It does not check the signature or whether the token is valid for a service.

Your values

The box is masked; choose Show to see it. It is checked in this page and is never sent or saved.

The token is checked in this page. It is not sent or saved.

Your result will show here

Fill in the values, then choose Check.

How to use this checker

  1. Choose The form of a token or A key against a format you type.
  2. Paste the token or key into the masked box. Choose Show if you want to see it.
  3. For a format, type the prefix, the characters allowed after it and their number, from the documentation of your API.
  4. Choose Check. The table lists every check with its result.

What is checked

  • Signed JWT (RFC 7519, compact form of RFC 7515): three parts joined by dots, each in base64url with no = padding. The header must be a JSON object with an "alg" member; the payload of a JWT must be a JSON object of claims.
  • Signature length: HS256 gives 32 bytes, HS384 48, HS512 64, ES256 64, ES384 96, ES512 132, EdDSA 64 (Ed25519) or 114 (Ed448); RS and PS signatures are as long as the RSA key (RFC 7518). An algorithm of "none" means the token is not signed.
  • Encrypted JWT (RFC 7516): five parts; the header names a key algorithm (alg) and an encryption (enc).
  • Opaque token or key: the length, the alphabet (such as hexadecimal or Base64url) and the bits it would hold if every character were random: length × log2(alphabet size).
  • Bearer token (RFC 6750): only letters, digits, - . _ ~ + / and = at the end can be sent after "Authorization: Bearer".
  • Copy problems: spaces or line breaks, the word Bearer pasted with the token, quotes from code, and characters that are not plain ASCII.

Worked example

The example token has three parts. Its header says HS256 and JWT, its payload has 3 claims with the times exp and iat, and its signature has 32 bytes, as HS256 gives. The form is well-formed.

For a format with the prefix demo_, 32 characters of small hexadecimal after it, the key in the example matches, and the format as a regular expression is ^demo_[0-9a-f]{32}$.

Limits you should know

  • A well-formed token is not a valid one. The tool does not check signatures, expiry times or whether a service accepts the token. To read the claims and check the times and the signature, use the JWT Decoder & Validator.
  • The tool has no list of the key formats of companies or products. Type the format your provider documents.
  • The result never shows the token or a part of it; it names an algorithm only when it is one of the registered names.
  • Even so, paste a live secret only on a device you trust, and prefer a test token. For the bits and patterns of a key, use the API Key Entropy Checker.

Related tools