Recognising Base64, and telling it apart from other encodings
Base64 has a recognisable signature. Its length is a multiple of four when padded, it draws only from `A-Za-z0-9+/=`, any `=` characters appear only at the very end, and it has no spaces or line breaks except in the MIME variant. If a string is long, dense, alphanumeric and mixed-case, Base64 is the first thing to try.
Two look-alikes are worth ruling out. Hexadecimal uses only `0-9a-f` and its length is a multiple of two, so a lowercase string with no letters past `f` is hex rather than Base64 - a 64-character one is very likely a SHA-256 digest. Percent-encoded text contains `%` followed by two hex digits and stays mostly readable, which Base64 never does.
The strongest signal for JWTs is the shape: three chunks separated by dots, using `-` and `_` rather than `+` and `/`, with no padding. Decode the first chunk and you should find JSON beginning `{"alg":`.